Re: PHP and getting part of URL

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

 



Your original post has this as the URL:
> http://www.mydomain.tld/jason/index.php 

That's why I gave you that command.

If you want jason out of what you posted,
Check out the following commands:
http://us.php.net/array_pop
http://us.php.net/explode


Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Jason ML wrote:
> Hi Micah,
>
>> dirname($_SERVER['REQUEST_URI']);
>
>
> I have tried that and I dont get the proper URI:
>
> Example running     print_r($_SERVER); I get: [REQUEST_URI] =>
> /net1003/people/jason/
>
> But then doing:
>
>     $jason = dirname($_SERVER['REQUEST_URI']);
>            
>     echo "URL: ";
>     echo $jason;
>
> I get: URL: /net1003/people
>
> Thoughts on what I am doing wrong.
>
> Jason

-- 
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