note 101544 rejected from language.constants.predefined by danbrown
| From: | danbrown@php.net | Date: | Thu, 23 Dec 2010 16:02:49 +0000 |
| Subject: | note 101544 rejected from language.constants.predefined by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-175173@lists.php.net to get a copy of this message | ||
Note Submitter: rawslime at gmx dot net
----
defined() does not recognize __DIR__ as a constant, also in PHP >= 5.3 it will return false.
you can simply define __DIR__ without any if/else, php will not throw an error, warning or notice.
define('__DIR__',dirname(__FILE__));
(tested with 5.3.1)