free webpage hit counter
Home | About | Awards | Contact | News | Gallery | Services | Blue Prints
Demo Reels | Tutorials | Gadgets | Shop | How to Order | Links
Browse By Category:

More "Web" Tutorials: [All Tutorials?]

Tutorials


Using PHP in a .html extension



:::August 14, 2006:::

In order to use php codes in a page with an extension other than .php, you need a server that supports .htaccess files.

What you have to do is to creat or edit the ".htaccess" file in the folder and add this line to it:

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


What does that code do?
That code will tell your server to search for php code(s) in .html and .htm files and execute them (only the folder and it's subfolder that has that edited ".htaccess" file).

So now if you go to that html file that contains php codes, it will be shown exactly like as if it was a php file...


Posted by Amin @ 8:09 AM | [Permalink To This Entry]



Best View: With FireFox, Internet Explorer, Opera, Netscape, @ 1024x786
Requirements: JavaScript, Flash