absolute path of any PHP script?

From: Date: Fri, 05 Jan 2001 14:23:49 +0000
Subject: absolute path of any PHP script?
Groups: php.general 
Request: Send a blank email to php-general+get-32881@lists.php.net to get a copy of this message
how do I get the absolute path to any PHP script currently being executed? __FILE__ does not help here, because if I have require( '../bar.php' ) ; in foo.php, __FILE__ in foo.php will contain e. g. 'c:/wwwroot/aaa/bbb/foo.php' (on windows), but in bar.php it will contain '../bar.php' (e. g. the argument passed to require()). I know I could write a function to do this, but surely there must be an easier way I just missed. TIA ____________________________________________________________ Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. cynic@mail.cz

« previous php.general (#32881) next »