Thursday, February 28, 2008

Enable php code to work inside a .html / .htm file

Enable php code to work inside a .html / .htm file

To get this to work you need to edit your
httpd.conf file.

Find the line that looks similar to this:
AddType application/x-httpd-php .php
and change it to look like this:
AddType application/x-httpd-php .php .htm .html
and all should be fine

Please restart httpd service after this .

------> If the server is shared then it is not possible to add these lines in httpd.conf

Instead it can be put in .htaccess for the site.

AddType application/x-httpd-php .php .htm .html