get URI folder for executing PHP script - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Skype & Technology (/forumdisplay.php?fid=9) +---- Forum: Tech Talk (/forumdisplay.php?fid=17) +----- Thread: get URI folder for executing PHP script (/showthread.php?tid=77080) get URI folder for executing PHP script by MeEtc on 08-28-2007 at 11:49 PM
basically, I am looking for a method to obtain the directory where the current script is running. I do know that $_SERVER['REQUEST_URI'] contains the full url, but it is not cross platform. (*cough* IIS *cough*) RE: get URI folder for executing PHP script by WDZ on 08-29-2007 at 12:27 AM
quote:Code stolen from WordPress... code:REQUEST_URI won't contain the hostname though... you can get that from HTTP_HOST. RE: get URI folder for executing PHP script by MeEtc on 08-29-2007 at 12:37 AM
oops, did i say REQUEST_URI? i meant SCRIPT_URI... RE: get URI folder for executing PHP script by roflmao456 on 08-29-2007 at 12:40 AM
stolen from php.net code: RE: get URI folder for executing PHP script by WDZ on 08-29-2007 at 12:58 AM
SCRIPT_URI? I've never seen that used in PHP... (Edit: Apparently it only exists under Apache with mod_rewrite enabled) code:http://shoutbox.menthix.net/crap/asdf/uri_test.php RE: get URI folder for executing PHP script by MeEtc on 08-29-2007 at 02:41 AM
code:thanks rofl RE: get URI folder for executing PHP script by roflmao456 on 08-29-2007 at 03:27 AM
quote:[offtopic/] lol @ /crap/asdf |