PDA

View Full Version : php in html does not work


javierrebelde
01-08-2010, 07:15 PM
Hi,

simple i am testing the php in html but does not work, this what i have:


<html>
<body>
<?php
echo "test page";
?>
</body>
</html>


when i upload the htlm file to test it i dont see the "test page" words

tux
01-08-2010, 07:31 PM
Did you save your file as a php file (eg. index.php) or an html file (eg. index.html) ?

It needs to be a php file and your host needs to support php.

edbr
01-09-2010, 04:13 AM
if you are trying to test it locally you will need to instal a test server. yahoogle for wamp, easyphp or xampp. these are self instaling apache servers with mysql and php included

davidj
01-12-2010, 04:20 PM
Add this to an empty file

<?php phpinfo(); ?>

upload it and view it through your browser

What do you see?

DWcourse
01-12-2010, 07:41 PM
Add this to an empty file

<?php phpinfo(); ?>

upload it and view it through your browser

What do you see?

But make sure the file name ends in .php (like info.php)