php problem

Problems with the Windows version of XAMPP, questions, comments, and anything related.

php problem

Postby daplex1138 » 09. August 2013 06:26

I am trying to test out a simple web page.
Code: Select all
<html>
<head><title>PHP Test</title></head>
<body>
<p>This is an HTML line</p>
<?php
echo "<p>This is a PHP line</p>";
phpinfo();?>
</body></html>

I view this page in my browser and the display is...
This is an HTML line
This is a PHP line

"; phpinfo();?>


When I installed XAMPP everything seamed to be okay. I got green lights for apache and mysql. I clicked thru the XAMPP welcome/example pages. The one that show the phpinfo() displays fine.
However, when I create my own test.php file with this code and put it into the htdocs directory and access it thru my brownser, something isn't right. I am not getting the long table of php info.
Any suggestions?
thanks!
daplex1138
 
Posts: 3
Joined: 09. August 2013 06:17
Operating System: Windows

Re: php problem

Postby Altrea » 09. August 2013 06:41

Your script is running fine on my test environment.
How do you "view this page in your browser"?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: php problem

Postby daplex1138 » 09. August 2013 19:14

I click and drag this test.php file from the folder location in htdocs directory onto firefox to view.
How should I view it?
daplex1138
 
Posts: 3
Joined: 09. August 2013 06:17
Operating System: Windows

Re: php problem

Postby daplex1138 » 09. August 2013 21:57

Nevermind, figured it out.
The path was thu the http://file:
instead of thru localhost
Duh!!
Thanks anyways!
daplex1138
 
Posts: 3
Joined: 09. August 2013 06:17
Operating System: Windows

Re: php problem

Postby Altrea » 10. August 2013 01:56

You're welcome :D
Glad you could find it out.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 109 guests