Forum Moderators: phranque

Message Too Old, No Replies

php wont work

         

chudz

1:58 am on Jul 12, 2004 (gmt 0)

10+ Year Member



Hi i am up to the part in my book from where you make a test php file, which is this:

<HTML>
<HEAD>
<TITLE>PHP Testing</TITLE>
</HEAD>
<BODY>
<?php
echo “If this works, we <i>really</i> did it!”;
?>
</BODY>
</HTML>

I did that and saved it as phptest.php and the i loaded it by going to [localhost...] and i get this result can someone help please!

Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in C:\Program Files\Apache Group\Apache2\test\phptest.php on line 7

olwen

2:07 am on Jul 12, 2004 (gmt 0)

10+ Year Member



Your example shows "smart quotes" as used in Microsoft word. You need ordinary ascii quotes.

gergoe

2:09 am on Jul 12, 2004 (gmt 0)

10+ Year Member



Try
<?php
echo [b]'[/b]If this works, we <i>really</i> did it![b]'[/b];
//or this, which is more the same:
echo [b]"[/b]If this works, we <i>really</i> did it![b]"[/b];
?>

instead. A better way to test the php is to make a file with the following in it:
<? phpinfo();?>

this will print all the settings of the php engine.

chudz

1:08 pm on Jul 12, 2004 (gmt 0)

10+ Year Member



ok thanks, it works now.