[pmwiki-users] including the contents of a php file on a wiki page

ThomasP pmwikidev at sigproc.de
Fri Dec 7 02:51:01 CST 2007


>>> as I said I probably misunderstood. You do want some markup which can
>>> pull php files into view in a wiki page. Not just paste code. Sorry,
>>> my mistake! I have no answers.
>>
>> Yes, I am trying to figure out a way to basically auto-document a given
>> page
>> in a "live" form which doesn't require remembering to cut/paste changes
>> onto
>> the page nor having to remember to re-copy the *.php file to another
>> name...
>> Maybe I'm just being lazy, but I know too often I document something and
>> then realize a better way to do it in the code but the new code never
>> makes
>> it back into any kind of documentation...
>>
>> Again, I'm interested both in the security ramifications as well as any
>> thoughts how to get non-eval'd source included onto a page...
>>
>
> If you are running on a Linux system you could create symlinks to the
> php files with a .txt suffix and use the IncludeFile recipe.
>
> Ian.
>

Actually the symlinks are not necessary. You can write

(:includefile ext=php :)

which will include all the php files in the uploads dir associated with
the group/page.

Authorization is necessary to make the contents be displayed: (currently)
the "includefile" level must be granted, which is true if you have
upload(?) rights. I will review this in the next time as the meaning of
this level might be actually different from what I thought during making
this recipe. (comments appreciated)

There will be an update to version 0.2 even before (probably today), as I
discovered the sorting mechanism was just plainly wrong in ver0.1.

ThomasP





More information about the pmwiki-users mailing list