Re: guess documentroot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux