|
Posted by Jason Barnett on 01/07/05 17:44
>
> Consider yourself bytten, RTFM indeed! (BTW, this behavior is not really
> mentioned anywhere that I can find in TFM, it is more or less an
> assumption to be made from an example which would not prove the include)
OK this is the last time I push the button on this one, but since you
asked ;)
http://php.net/manual/en/function.require.php
"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. The conditional statement won't affect require(). However, if
the line on which the require() occurs is not executed, neither will any
of the code in the target file be executed. Similarly, looping
structures do not affect the behaviour of require(). Although the code
contained in the target file is still subject to the loop, the require()
itself happens only once."
OK so I had my version wrong... ah well *sigh*
--
Teach a person to fish...
Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html
PHP Manual: http://php.net/manual/
php-general archives: http://marc.theaimsgroup.com/?l=php-general&w=2
[Back to original message]
|