On Thursday 15 March 2001 16:51, you wrote:

> ok, this is what you asked for
>
> <?php
>
>  function depth()
>  {
>   global $PHP_SELF;
>
>   $count = count_chars($PHP_SELF);
>
>   for($c = 0; $c < $count[ord('/')]; $c++)
>    $return[] = "..";
>
>   if (isset($return))
>    return implode('/', $return);
>  }

Won't work for the (perfectly valid) URL 
http://somewhere.de/lvl1////lvl2//lvl3/foo.bar

it's quite unlikely though that someone enters such a thing

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Google results 1-10 of about 142,000,000 for e. Search took 0.18 seconds.

- http://www.google.com/search?q=e

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to