How to process PHP code in HTML files

To process PHP code in files with .htm, .html extension you should create .htaccess (or add required entry) in root directory of the site and put the following code into it:

 

AddHandler application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml .htm .html
AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml .htm .html

 

Then just save the file and start working.

 

With regards, Shneider-host.

 

Shneider-host – web-hosting specially for Your websites