Re: guess documentroot
| From: | clive | Date: | Thu, 05 Oct 2006 14:08:21 +0000 |
| Subject: | Re: guess documentroot | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-242668@lists.php.net to get a copy of this message | ||
if we have a script like http://localhost/mydir/myseconddir/index.php is there a way to get that it's runing on /mydir/myseconddir/ use $_SERVER['[PHP_SELF'] or $_SERVER['SCRIPT_NAME']and then simply use strripos() to get the last forwarsd-slash and substr() to get the value you want.
-- Regards, Clive