Jump to content
xisto Community
Sign in to follow this  
iGuest

Execute .plm File As .php On Local Host

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.