Re: dirname(__FILE__)
| From: | Wolfram Kriesing | Date: | Thu, 24 Oct 2002 22:38:44 +0000 |
| Subject: | Re: dirname(__FILE__) | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-10234@lists.php.net to get a copy of this message | ||
Stig S. Bakken wrote:
Stop the press! dirname(__FILE__) won't work anyway. It screws up require_once and include_once and may lead to redefinition errors. Say you have two PEAR trees in your include_path, for example one provided by your ISP and one for you. This means that a dirname-style include in a file in one tree will include the file only from that tree, and the "same" include in the second tree will try including the same file there, with a different path, which basically renders include_once useless.but i think that is what is needed, if i have 2 PEAR installations with different versions of the files, i also just want tree one to depend on the files in tree one, not on the files in tree two. that's why i have 2 installations of PEAR. at least that's what i would need. example: imagine you have an old PEAR::someClass in tree one, which has an old API but in tree two the API of this class is the newest but since the application that works with the old API, so to say tree one is so huge, approved and stable that you dont want to or cant change the entire application, you need to have exactly this setup as dirname(__FILE__) would provide. i came across this problem a lot of times. and dirname(__FILE__) would solve it! or do i not understand something here? -- Wolfram ... translating template system ... http://sourceforge.net/projects/simpletpl ... authentication system .... http://sf.net/projects/auth