Re: Re: help on using 'request_uri' to make a front-end site
| From: | Richard Heyes | Date: | Tue, 18 Mar 2008 10:02:14 +0000 |
| Subject: | Re: Re: help on using 'request_uri' to make a front-end site | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-271701@lists.php.net to get a copy of this message | ||
The thing that would help here is if I could get a reliable way to extract the working 'path' (from an http:// pov) from the $_SERVER array somehow. Each of them gives a result tantalizingly close to the base, but they get it wrong in various ways.You can use $_SERVER['PHP_SELF'] which will give you the path to the script or $_SERVER['REQUEST_URI'] (you will probably have to remove the query string with this), along with either dirname(). -- Richard Heyes Employ me: http://www.phpguru.org/cv