note 44952 deleted from function.include by tomsommer
| From: | tomsommer@php.net | Date: | Sat, 21 Aug 2004 10:47:15 +0000 |
| Subject: | note 44952 deleted from function.include by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-75053@lists.php.net to get a copy of this message | ||
Note Submitter: comlampe at aol dot com
----
Sometimes its handy to know in a included/required file, from where its been included.
When using get_included_files it returns - even when used inside an included file - the
"base" file name and path. So:
$included_files = get_included_files();
echo $included_files[0];
Or, when needing just the file name:
echo basename($included_files[0]);
--Marco