RE: [PEAR-DEV] dirname(__FILE__)
| From: | LIMBOURG Arnaud | Date: | Wed, 16 Oct 2002 11:45:30 +0000 |
| Subject: | RE: [PEAR-DEV] dirname(__FILE__) | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-10082@lists.php.net to get a copy of this message | ||
Yuk, that's ugly ;)
It should be too much of a performance hit but it is still one.
Arnaud.
> 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=