On Dec 13, 2007 2:49 PM, Nisse Engström <[EMAIL PROTECTED]> 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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php