Problems with the Windows version of XAMPP, questions, comments, and anything related.
by mikespike2008 » 07. January 2022 00:31
Have just installed 8.1.1 and am trying html and php files in the dashboard folder. Pure html is working with an htm extension, so is php with a php extension. However the simple test file shown below just outputs the html part and doesn't show the php. Just shows "this should work". What am I doing wrong? Thanks.
<!DOCTYPE html>
<html>
<body>
this should work
<?php
echo "My first PHP script!";
?>
</body>
</html>
-
mikespike2008
-
- Posts: 2
- Joined: 07. January 2022 00:27
- XAMPP version: 8.1.1
- Operating System: Windows 10
by Altrea » 07. January 2022 00:39
The file does need to have a .php file extension and needs to get requested by an url.
So your browsers address bar should start with something like
http://localhost
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!It's like porn for programmers
-
Altrea
- AF Moderator
-
- Posts: 11934
- Joined: 17. August 2009 13:05
- XAMPP version: several
- Operating System: Windows 11 Pro x64
by mikespike2008 » 07. January 2022 23:20
Thanks for that Altrea. I did have the http://localhost/dashboard in front of it but assumed it would find the php embedded in the html and run it. I've tried it with the php extension and it worked fine. Thanks again.
-
mikespike2008
-
- Posts: 2
- Joined: 07. January 2022 00:27
- XAMPP version: 8.1.1
- Operating System: Windows 10
Return to XAMPP for Windows
Who is online
Users browsing this forum: No registered users and 170 guests