[pmwiki-users] Upload and view php files

Patrick R. Michaud pmichaud at pobox.com
Tue Oct 30 19:34:33 CDT 2007


On Wed, Oct 31, 2007 at 12:08:24PM +1300, John Rankin wrote:
> How do I enable Attach:filename.php safely and make the file
> viewable (not executable) when a reader clicks on the 
> filename.php link?
> 
> It obviously works in the PmWiki Cookbook. How is that
> configured?

In the uploads/ directory on pmwiki.org, I have a .htaccess
file that reads:

    AddType text/plain .php

This tells the webserver to display all files ending in .php as
text/plain (as opposed to executing them).

Pm



More information about the pmwiki-users mailing list