Re: pathinfo or other
| From: | Elbert F | Date: | Wed, 15 Feb 2012 22:10:35 +0000 |
| Subject: | Re: pathinfo or other | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-316615@lists.php.net to get a copy of this message | ||
SCRIPT_NAME is a server side path, try REQUEST_URI. This includes the query
string but it's easy to remove.
Elbert
http://swiftlet.org
On Thu, Feb 16, 2012 at 8:27 AM, Donovan Brooke <lists@euca.us> wrote:
> Hello,
>
> What is the best way to get the /somedir/ values in the request URI?
>
> I tried
> $t_pathinfo = $_SERVER['PATH_INFO'];
>
> but was given an error of undefined index. After looking at the docs, it
> appears the error derives from something I may have to do in the .ini file.
>
> However, is there a standard/better way of grabbing the info after the
> host and before the query string.. perhaps 'SCRIPT_NAME'?
>
> Thanks!
>
> Donovan
>
>
>
>
> --
> D Brooke
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>