Page 2 of 2

Posted: Sun Aug 10, 2003 8:35 pm
by 187skillz
well I'm a newbie too, you can't rename it to html extension, it won't work, it has to be .php extension

Posted: Mon Aug 11, 2003 12:36 am
by JAM
Then I rename it to html to see if works.
Think the problem might be there...

Code: Select all

<html>
 <body>
<?php
 echo "foo";
?>
 </body>
</html>
...is the same as...

Code: Select all

<?php
echo "
<html>
 <body>
foo
 </body>
</html>
";

?>
You still need both files with the extension .php
PHP on the server will parse everything outside <?php ... ?> as the normal html. Renaming the file to .html makes PHP on the server not understand that it should look for the <?php ... ?> tags inside the file...
m3rajk wrote:like in anything, before you look to see if it's a zebra, make sure it's not a horse.
Yes. Still, how you present that fact can vary...