Re: current directory?
| From: | Jason Barnett | Date: | Tue, 20 Jul 2004 08:12:32 +0000 |
| Subject: | Re: current directory? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-191128@lists.php.net to get a copy of this message | ||
I should have probably added this to my last note, but if I find I'm having "weirdness" with relative includes I do something like this:
include_once dirname(__FILE__) . "../relative/path/to/script.php";
The __FILE__ constant will resolve to the name of the file it's located in, so you can rely on the relative path to get to where you want it.