note 100806 modified in language.constants.predefined by thiago

From: Date: Mon, 08 Nov 2010 14:01:27 +0000
Subject: note 100806 modified in language.constants.predefined by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-173846@lists.php.net to get a copy of this message
When __DIR__ is not defined, you can also use this workaround to generate it: <?php if(!defined('__DIR__')) { $iPos = strrpos(__FILE__, "/"); define("__DIR__", substr(__FILE__, 0, $iPos) . "/"); } ?> Keep in mind this sets __DIR__ to the directory you are running this snippet from. --was-- When __DIR__ is not defined, you can also use this workaround to generate it: if(!defined('__DIR__')) { $iPos = strrpos(__FILE__, "/"); define("__DIR__", substr(__FILE__, 0, $iPos) . "/"); } Keep in mind this sets __DIR__ to the directory you are running this snippet from. http://php.net/manual/en/language.constants.predefined.php

« previous php.notes (#173846) next »