On Mon, Jul 6, 2009 at 8:24 AM, Daniel Brown<paras...@gmail.com> wrote:

>    Conversely, using the code example from above (and building upon
> it), we know that __FILE__ remains static regardless of the point of
> the call.  Thus, it's a better and more reliable method, and is usable
> even if $_SERVER data is not available to the script.

+1 - i use dirname(__FILE__) everywhere. Rasmus said "you can just use
./includes/foo.php, why have an extra function call" (the dirname) but
i tried that on one of my setups and what is odd is it couldn't find
the files from the forced relative paths which should work just fine.
there could have been other weird voodoo going on too, but i know for
a fact dirname(__FILE__) has been reliable and the best part is it
does not require $_SERVER.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to