Home > PHP > How to run php code in .htm and .html documents

How to run php code in .htm and .html documents

For .html files add the following to .htaccess:

AddType application/x-httpd-lsphp .html

 

And for .html files add this:

AddType application/x-httpd-php .htm