|
Posted by irezvin on 02/02/07 00:40
> Another thing is that if you use require and a non-existing file, php
> doesn't throw an error if the require statement is unreachable, like behind
> if(FALSE), only when the file really is included in the code.
Sorry, people, to disturb you, but if php attempts to scan every
include()'d or require()'d file, how it deals with such construct?
if (false) {
$fileName = 'someFile.php';
include($fileName);
}
Even if include statement is processed, the $fileName var won't be
initialized before that point! I used such construct a lot, and
haven't get any errors or messages! Or even slowdonws! And you can
include/require you files in a loop, continiuosly changing the
filename or many other ways... so I think that PHP does not behave
that way, it does not process includes or requires that are not in the
execution thread.
Navigation:
[Reply to this message]
|