faqts : Computers : Programming : Languages : PHP : Installation and Setup : General

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

9 of 9 people (100%) answered Yes
Recently 3 of 3 people (100%) answered Yes

Entry

How can I change the extension that PHP uses?

Jun 18th, 1999 07:00
Nathan Wallace, Michael Stearne, noor@activeweb.co.il


In Apache in your srm.conf or httpd.conf file find:

AddType application/x-httpd-php3 .php3

then on the next lines add:
AddType application/x-httpd-php3 .phtml
AddType application/x-httpd-php3 .phtm

Restart Apache and they should be vaild file extensions.

If you don't have access to these files, in the directory you want files
to be parsed as .phtml or .phtm add

AddType application/x-httpd-php3 .phtml
AddType application/x-httpd-php3 .phtm

to the .htaccess file. (create it if it doesn't exist)

.phtml and .phtm are just examples, you can use any extension you like.

Note that you can put the same extensions on one line, hence this is
also correct:

AddType application/x-httpd-php3 .phtm .phtml .php3