Re: safe_mode_include_dir

From: Date: Thu, 13 Dec 2007 19:53:32 +0000
Subject: Re: safe_mode_include_dir
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-265847@lists.php.net to get a copy of this message
On Dec 13, 2007 2:49 PM, Nisse Engström <news.NOSPAM.0ixbtqKe@luden.se> wrote: > On Wed, 12 Dec 2007 15:43:28 -0500, "Daniel Brown" wrote: > > > Is there a specific reason you're using require_once() instead of > > include_once() ? There actually is a difference.... include() and > > include_once() will only include the file if that line of code is > > executed, whereas require() and require_once() will include the file > > even if the line is inside of an if() {} block for which the > > condition(s) are never matched. > > Is that still the case? > > <http://se2.php.net/manual/en/function.require.php>: > > "require() and include() are identical in every way except > how they handle failure." > > "Note: Prior to PHP 4.0.2, the following applies: require() > will always attempt to read the target file, even if the > line it's on never executes." D'oh! This is why it's a good idea to check the manual every so often, just to re-read things. :-\ -- Daniel P. Brown [Phone Numbers Go Here!] [They're Hidden From View!] If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you.

« previous php.general (#265847) next »