[pmwiki-users] Upload and view php files

John Rankin john.rankin at affinity.co.nz
Thu Nov 1 17:23:44 CDT 2007


On Wednesday, 31 October 2007 1:34 PM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>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
>
Ah! Thank you. I also had to get the hosting service to enable
.htaccess, which they disable by default. Now works like a charm.

-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list