note 48053 deleted from function.include by peehaa

From: Date: Fri, 09 Dec 2016 22:43:23 +0000
Subject: note 48053 deleted from function.include by peehaa
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-208376@lists.php.net to get a copy of this message
Note Submitter: dragon at wastelands dot net ---- The __FILE__ macro will give the full path and name of an included script when called from inside the script. E.g. <?php include("/different/root/script.php"); ?> And this file contains: <?php echo __FILE__; ?> The output is: /different/root/script.php Surprisingly useful :> Obviously something like dirname(__FILE__) works just fine.

« previous php.notes (#208376) next »