Portal Home > Knowledgebase > PHP & MySQL > Parsing PHP in .htm/.html files
To have our servers parse PHP code in your .html and .htm pages you will need to modify the .htaccess file in your public_html folder adding the following lines:
AddType application/x-httpd-php .html
AddType application/x-httpd-php .htm
This can be accomplished by modifying the public_html/.htaccess file manually or this can also be done via the MIME Types icon in your Control Panel.
- Login to your Control Panel
- Click on the MIME Types icon
- In the "MIME Type" field type or paste this:
application/x-httpd-php
- In the "Extension(s)" field type the extension
you wish to have parse PHP code (ex: .html) - Click the Add button
You should now see "application/x-httpd-php .html" listed under "User defined MIME types". If you wish to add other extensions repeat the process above for each extension.
Add to Favourites Print this Article
Powered by WHMCompleteSolution
Accepted Payment Methods: |