Re: dirname(__FILE__)
| From: | Ondrej Jombik | Date: | Wed, 16 Oct 2002 10:54:37 +0000 |
| Subject: | Re: dirname(__FILE__) | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-10081@lists.php.net to get a copy of this message | ||
> Therefore I would really welcome if people would use dirname(__FILE__) in
> their includes in order that packages dont have to be in the include
> path.
I'm not sure, but wasn't __FILE__ directive broken in older PHP
versions? If so, I want to suggest usage like this one:
require_once
dirname(__FILE__)
. (strlen(dirname(__FILE__)) > 0 ? '/' : '')
. 'filename.php';
I'm sure you get the idea.
=Nepto=
____________________________________________________________________________
Ondrej 'Nepto' Jombik, http://www.nepto.sk/
nepto@atomicpile.sk