Re: PHP and getting part of URL

From: Date: Wed, 08 Oct 2008 00:44:30 +0000
Subject: Re: PHP and getting part of URL
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-281555@lists.php.net to get a copy of this message
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

« previous php.general (#281555) next »