note 9652 deleted from function.str-repeat by jimw
| From: | jimw@php.net | Date: | Wed, 02 Jan 2002 11:52:07 +0000 |
| Subject: | note 9652 deleted from function.str-repeat by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-24239@lists.php.net to get a copy of this message | ||
You may find this code fragment useful if you want to calculate the relative path from your PHP file
to the top level:
$path_up = str_repeat("../",substr_count($PHP_SELF,"/")-1);
Note that $PHP_SELF will contain at least one "/" character (which is practically the top
level itself).