PDA

View Full Version : Running PHP from .htm files


Fatman
03-09-2004, 10:14 AM
Right, Ive just finished my latest website and all the files are in *.htm format.

Id forgot about the tracking etc - doh!

so do i need to rename all pages to php and change all my links or is there a way i can include the php pages in the html ones without having to rename any files?

Thanks
Fatman

mordred
03-09-2004, 10:35 AM
You need to tell your server what to do with .htm files. If he doesn't send them for preprocessing to the PHP engine, no PHP code will be executed within. Should you be on an Apacher server and have the rights to use .htaccess files, you can put this line into a .htaccess file to let .htm files be parsed by PHP.


AddType application/x-httpd-php .htm

Fatman
03-09-2004, 11:19 AM
thanks very much - that worked a treat!