[pmwiki-users] get current coockbook script path
Patrick R. Michaud
pmichaud at pobox.com
Thu Aug 25 13:56:38 CDT 2005
On Wed, Aug 24, 2005 at 09:36:03AM +0200, Sebastian Siedentopf wrote:
> Hi
>
> I have a cookbook script that outputs some html with css url elements:
>
> background: url(image.jpg)
>
> Currently the images have to be in the skin folder, but I want them
> to go in a cookbook subfolder together with my script, without
> hardcoding the cookbook subfolder name:
>
> url($CurrentScriptLocation/image.jpg)
>
> instead something like
>
> url(/cookbook/myscript/image.jpg)
>
> How do I evaluate the current cookbook subfolder my cookbook script
> is running from ($CurrentScriptLocation)?
You don't. More to the point, files that are in the cookbook/
directory shouldn't be directly accessible from the web (conversely,
files that need to be accessible from a browser shouldn't go in cookbook/).
In fact, in the next release of PmWiki there are going to be files
in cookbook/ to block browsers from being able to access that directory.
In general, any files to be made available via url should go somewhere
in the "pub/" directory.
Pm
More information about the pmwiki-users
mailing list