Page 1 of 1

HELP!!! >_< IM SO LOST!

Posted: Sat Apr 26, 2003 7:02 pm
by Birdy
I need help badly. I just got the book 'PHP and MYSQL for Dummies" and in like the second chapter it shows a testing script, and i type the script in , and its doenst work.

<html>
<head>
<title>PHP TEST</title>
</head>
<Body>
<p>This is an HTML line.
<p>
<?php
echo "This is a PHP line";
phpinfo();
?>
</body>
</html>
I type it in, and it doesnt work.... I should see
This is an HTML line.
This is a PHP line
Right???

PLZ talk with me!
ICQ - 264389792
MSN - L2K_birdy@hotmail.com
AIM - Freak4God0122
Yahoo - Freak4God0123

Posted: Sat Apr 26, 2003 7:06 pm
by volka
right.
And what DO you see?
  • if you only see This is an HTML line
  • make sure you requested the page via http://server/path/to/script (not just opened the file from your local harddisk)
  • if it still doesn't work: open the source view of your browser. If you can see the <?php ... ?> part there, your webserver isn't set up to serve php

whoa

Posted: Sat Apr 26, 2003 7:11 pm
by Birdy
Whoa. .. Lost me there a bit...

make sure you requested the page via http://server/path/to/script (not just opened the file from your local harddisk)
Ok, how would I do that?

Posted: Sat Apr 26, 2003 7:15 pm
by patrikG
What do you see when you run this script?

Posted: Sat Apr 26, 2003 7:17 pm
by Birdy
only
This is a HTML line.

Nothing else.

Re: whoa

Posted: Sat Apr 26, 2003 9:26 pm
by volka
Birdy wrote:Whoa. .. Lost me there a bit...

make sure you requested the page via http://server/path/to/script (not just opened the file from your local harddisk)
Ok, how would I do that?
Just to be sure: You have a webserver (either installed on your localhost or got an account somewhere) and there is php running?
Let's assume you have installed an apache webserver, configured php according to http://www.php.net/manual/en/installation.php, the server is up and running and you placed a script called test.php in the DocumentRoot-Directory of the server, you have to call http://localhost/test.php in your browser.
Did you do that?

Posted: Sat Apr 26, 2003 9:28 pm
by Birdy
got it thankz