Hi, I have no problem with PHP file, but I just wonder why this simple tag does not work in html file: <?php echo "It Works!"; ?> Why? I've search on Goole and there's no solution. The reason I want to know about this is because I want o migrate my all PHP-powered site into html. Thanks for your help in advance
Its because your extension is .html and not .php, however you can tell your server to phrase html files like as if it was a php file. To do that you need to create or add to a .htaccess file and place the following into it. AddType application/x-httpd-php .html .htm Code (markup): or for php5 use this AddType application/x-httpd-php5 .html .htm Code (markup):
It's a big heap of headach. I added .htaccess file and it didn't work. Anyway, I want to re-design my website in html5 with PHP backup, anyone has suggestions about this? Thanks
Try instead AddHandler application/x-httpd-php .html .htm Code (markup): or for php 5 AddHandler application/x-httpd-php5 .html .htm Code (markup):
Tried it and Firefox crashed. Like this: http://www.honeytechblog.com/how-to-fix-applicationx-httpd-php-trouble-in-getting-php-to-parse/
There's no reason for it not to work, remember if your server is running php 5 then you need to amend your .htaccess file to application/x-httpd-php5
@ketting00 do you mean you want a design complied with html5 powered by php? You know that php != html right? If you want an all html website, then you have to do a new html page for everything, you know that, right ?