HOME       >>       Programming

Execute .plm File As .php On Local Host


Hi !! I have created a file index.plm and in C:\wamp\www directory. I have added some php code in it. Now I want to execute it as php file. So when I go to localhost and select index.plm file, It shows the whole php code instead of being executed as php file. May it be possible to add other extensions in any config file and make run it as php? Is there anything like rewriterule (.htaccess) for localhost?Thanks Dev


Why would you want to use .plm extension to run php code and not .php? Is there a big difference?

One way you could do it is by using mod rewrite and just have an extension in the string you want to, but if you want to execute real files with php, you can easily do it with appending apache conf file, I think it's httpd.conf or you can use .htaccess file and use this line of code:

AddType application/x-httpd-php .plm

So apache will treat your files having .plm extension as php files.


Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.