Include Files for a html page?

titchyc

New member
I have designed a page using html, but i want to make use of include files for the header and footer, what is the best method?

i know how to use php include files for php documents but want to know how to use include files for html doc. any help would be good
 
If your file is in HTML, in order to insert a PHP code like the include() function, you need to modify your .htaccess file for the PHP code inside the HTML file to be parsed.

1. Go to your website's root directory
2. Find the file named .htaccess ( just like this; there is nothing before the dot )
3. Edit it using any text editor like NOTEPAD by adding the following line:

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

4. Save it as .htaccess again and upload it to your root directory

You are done: Your PHP code ( include() function ) inside the HTML page will be parsed
 
Back
Top