Page 1 of 1

php problem

PostPosted: 09. August 2013 06:26
by daplex1138
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!

Re: php problem

PostPosted: 09. August 2013 06:41
by Altrea
Your script is running fine on my test environment.
How do you "view this page in your browser"?

Re: php problem

PostPosted: 09. August 2013 19:14
by daplex1138
I click and drag this test.php file from the folder location in htdocs directory onto firefox to view.
How should I view it?

Re: php problem

PostPosted: 09. August 2013 21:57
by daplex1138
Nevermind, figured it out.
The path was thu the http://file:
instead of thru localhost
Duh!!
Thanks anyways!

Re: php problem

PostPosted: 10. August 2013 01:56
by Altrea
You're welcome :D
Glad you could find it out.