« How to Access a Page in Google's Cache | Main | How to Control the Mouse Pointer Without a Mouse in Windows XP »

How to use PHP in pages with a .html extension (or any other)

To be able to use php code on a page with an extension other than .php, you need a server which supports .htaccess files.
To add an extension to be parsed for php, create or edit a file called .htaccess (with the dot first) containing the following line:
AddType application/x-httpd-php .html .moo .htm
This tells the server to check for php code and execute it in files with extensions .html, .moo or .htm.

Related Entries

How to Find the Current URL with PHP - Nov 02, 2005

Find a visitor's IP Address with PHP - Nov 01, 2005

Write text on a dynamically generated image using PHP - Oct 19, 2005

Write Text on to an existing PNG image using PHP - Oct 19, 2005

Generate a Month Calendar In PHP - Oct 19, 2005

How to use the query string in PHP - Oct 19, 2005

Comments

THANK YOU!!!!

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Adlinks

Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 3.2