[pmwiki-users] Cookbook path
pmwiki at solidgone.com
Sun Feb 10 16:52:30 CST 2008
I'm writing a Cookbook (or Recipe, I never know which is which), and I
need to get the URL of the location that the script is executing from --
basically the cookbook directory. This way gets me the script *path*
(not the URL), which isn't quite what I need:
The best I have so far is this (extracted from pmwiki.php), but that
assumes the location of cookbook directory.
preg_replace('#/[^/]*$#', '/cookbook', $ScriptUrl, 1)
Anyone done this before?
~ ~ David
More information about the pmwiki-users