Parsing HTML Files as PHP

From OCS Support Wiki

Jump to: navigation, search

[edit] Introduction

This guide will show you how to enable PHP code on your HTML pages.

[edit] Enabling PHP on HTML Pages

In your .htaccess file in your public_html folder, add:

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

If you don't have an .htaccess file, just create one. You may have to enable hidden files in your FTP program to see and edit hidden files (files with a . at the beginning).