how change php extensions file to another file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
prakashadmane
Forum Commoner
Posts: 33
Joined: Thu Mar 01, 2007 1:53 am
Location: mumbai,india
Contact:

how change php extensions file to another file

Post by prakashadmane »

i want change php extensions file index.php to another file like index.kk ..

how will know php parser that file is php .that file should be run ...
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

You already told the webserver to let php handle requests for files having .php as filename extension.
Now tell it to let php handle files having the filename extension .kk, too.
How you did this depends on the webserver you're using. E.g. for apache
http://www.php.net/manual/en/install.unix.apache2.php wrote:Tell Apache to parse certain extensions as PHP. For example,
let's have Apache parse the .php extension as PHP. You could
have any extension(s) parse as PHP by simply adding more, with
each separated by a space. We'll add .phtml to demonstrate.

AddType application/x-httpd-php .php .phtml
Post Reply