

759
Start earning money with your Website.
Matched.co.uk pays 5 english pounds when you sign up and 3 pounds per month for each ad you publish
Find out more at http://www.matched.co.uk
Find more tutorials at

In this tutorial I recommended to use .php extension so far because it won't work other ways .But if your have a HTML/HTM website ,this can be a problem ,you'd heve to rename all your pages and also you don't want to loose the search engine ranking of your html pages, so if you want to add PHP functionality and dynamicity to it,read the following article and the PHP code will work on HTML pages and you won't have tons of broken links.But, careful.thou,from the moment you do this configuration ,everything between <? and ?> will be considered as PHP by the parser.
On Apache Servers
To force Apache to run PHP code on .HTML/HTM pages is very simple.If you have
your website hosted on a remote webserver,download the .htaccess file from the
root web folder and add the following rows:
AddType application/x-httd-php .html
AddType application/x-httd-php .htm
Then upload the .htaccess back
to the server.
If you have Apache running on your computer,open the httpd.conf file
with notepad ,find the Add Type section and add the following rows
AddType application/x-httd-php .html
AddType application/x-httd-php .htm
Then save the file and close
it.
On IIS Web Servers
From now on anything in your HTML/HTM pages between the tags <? ?> will be recognized by IIS as PHP code .To check it,try to apply to the include example at the beginning of this article.Do all exactly the same but change the extension of TestInclude2.php in .html.