Re: PHP and getting part of URL
| From: | Daniel Brown | Date: | Wed, 08 Oct 2008 00:09:01 +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-281551@lists.php.net to get a copy of this message | ||
On Tue, Oct 7, 2008 at 7:57 PM, Jason ML <mailinglists@mailnewsrss.com> wrote:
>
> But then doing:
>
> $jason = dirname($_SERVER['REQUEST_URI']);
>
> echo "URL: ";
> echo $jason;
>
> I get: URL: /net1003/people
>
> Thoughts on what I am doing wrong.
Yeah. Not R'ing TFM. dirname() gives you the name of the
directory ABOVE what you pass.
http://php.net/dirname
--
</Daniel P. Brown>
More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.