PHP In HTML Files - Apache httpd.config File
Previous  Top  Next

To run php scripts in html files, reconfigure Apache (the httpd.conf file) and add the lines:

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

Then restart Apache on the server: apachectl restart

The above method requires root access to the server to set it up. An alternate method is to create an .htaccess file with the AddType lines and place it within the AShop directory where OrderForm or other PHP scripts will be used within HTM or HTML files.