I need to be able to determine a files directory path without the file name as $PHP_SELF does. I will be dynamicaly including a particular file with the same name orginal to each directory.
Is this possible. I am guessing it is an enviroment variable but I could not find it either here or php.com.
Thanks FutureShock
I think there is a $SERVER superglobal that tells you the file path. Search for $SERVER at PHP.net.
Try dirname( $PHP_SELF );
HalfaBee
Thanks HalfaBee, yes the dirname($PHP_SELF) worked perfectly.
PHPGuru2, thanks for pointing out that $_SERVER variable, it has loads of good stuff packed in it too.
Again the PHP community pulls through..WOOT!