I want a function that gives me the base directory of a script.
So when given the script file '/var/www/test.org/html/test/index.php' from
$_SERVER['SCRIPT_FILENAM E'] it returns '/var/www/test.org/html/test/'.
I am wondering the neatest way to do this ?
I cannot find a reverse string search function.
Many thanks in advance,
Aaron
So when given the script file '/var/www/test.org/html/test/index.php' from
$_SERVER['SCRIPT_FILENAM E'] it returns '/var/www/test.org/html/test/'.
I am wondering the neatest way to do this ?
I cannot find a reverse string search function.
Many thanks in advance,
Aaron
Comment