note 13887 added to function.dirname.php
| From: | r dot j dot b dot groot at kub dot nl | Date: | Sun, 08 Jul 2001 16:52:11 +0000 |
| Subject: | note 13887 added to function.dirname.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15094@lists.php.net to get a copy of this message | ||
Sorry, the script I just published defines the HIGHEST directory (the root). It would therefore
return ~s751294 in the example above.
The correct script is as follows:
$language = $PHP_SELF;
$language = dirname($language);
$language = substr (strrchr ($language, "/"), 1);
echo "This is the lowest dir: $language";
http://www.php.net/manual/en/function.dirname.php