HELP!!! >_< IM SO LOST!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Birdy
Forum Newbie
Posts: 4
Joined: Sat Apr 26, 2003 7:02 pm
Location: Texas
Contact:

HELP!!! >_< IM SO LOST!

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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
Birdy
Forum Newbie
Posts: 4
Joined: Sat Apr 26, 2003 7:02 pm
Location: Texas
Contact:

whoa

Post 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?
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

What do you see when you run this script?
Birdy
Forum Newbie
Posts: 4
Joined: Sat Apr 26, 2003 7:02 pm
Location: Texas
Contact:

Post by Birdy »

only
This is a HTML line.

Nothing else.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Re: whoa

Post 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?
Birdy
Forum Newbie
Posts: 4
Joined: Sat Apr 26, 2003 7:02 pm
Location: Texas
Contact:

Post by Birdy »

got it thankz
Post Reply