Finding the location of an included script
| From: | Gadi Cohen | Date: | Thu, 09 Dec 2004 14:46:44 +0000 |
| Subject: | Finding the location of an included script | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-203828@lists.php.net to get a copy of this message | ||
Is this possible?
I'm trying to write a back end to be used in most of my websites.
While I can simply use symlinks to ensure this is included from my
various sites but only exists once on the hardrive, I'd prefer to simply
include the file and have the script itself work out where it lives.
So if I have: include("/path/to/backend.php");
Is there a way from inside of backend.php to return "/path/to" ?
Gadi