Re: $ SERVER["REQUEST URI"] includes domain unexpectedly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 14 Sep 2007, junk@xxxxxxxxxxxxxxxx wrote:
> In my old server running Apache 1.3 and PHP 4 this code will return just the
> URI as expected:
>
> $_SERVER["REQUEST_URI"] = "/some-html-file.html"
>
> In my new server with Apache 2 & PHP 4 this code returns the domain:
>
> $_SERVER["REQUEST_URI"] = "/full-domain-name.com/some-html-file.html"

basename() will assist you in getting the last part of the
$_SERVER['REQUEST_URI'] path.. seems like that's what you're after.

http://php.net/basename


-- 
Greg Donald
Cyberfusion Consulting
http://cyberfusionconsulting.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux