Please note, this is a STATIC archive of website www.thewebhelp.com from 28 Sep 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

How to insert PHP code in .html files

Normally you can only insert php code blocks into files ending in .php extension, by making some small modification you can also include php code inside html documents:

Create a blank file and call it .htaccess, you will need to upload this file on your server in the directory where you want to have .html pages containing php code or you can also place the .htaccess file in your site root, the settings inside it will apply to all its sub directories.

You need to type only one of these lines inside your .htaccess file, these are the most common lines, most servers work with one of the first 2:

AddType application/x-httpd-php htm html
AddType application/x-httpd-php .html .htm .php
AddHandler x-httpd-php .html .htm .cgi .php
AddType x-mapp-php4 .html .htm .php
AddHandler server-parsed .html .htm .php
AddType application/x-httpd-php4 .htm .html .php
AddHandler application/x-httpd-php5 .html .htm .php
Note: GoDaddy.com shared servers need an hour before it can read a new .htaccess created on server, after that any changes inside .htaccess file are applied instantly.
Rate this content; the results will appear next to article links in site:
You need flash player