Treating .html files as PHP
2006-08-17 22:29:40
This article describes how to have your .html files interpreted as PHP so that you can embed PHP code in them.
You need to edit or create a text file called .htaccess and upload it to your web site directory. The .htaccess file needs to include the following line:
This allows you to rename PHP files as HTML files instead, so you can put PHP code in the page. It treats mypage.htm as if it were mypage.php.
AddHandler application/x-httpd-php .php .htm .html
This allows you to rename PHP files as HTML files instead, so you can put PHP code in the page. It treats mypage.htm as if it were mypage.php.
Page: 1


