Posted by Markus Ernst on 06/30/06 13:08
Margaret Willmer schrieb:
>
> Could you tell me however, if there is an advantage in using
> "require_once" instead of "include".
Use require_once() or include_once() for including files with class or
function definitions, to avoid an error if the same file would be
included at some other place in your script.
Use require() or include() if you possibly want to include the same
piece of code more than once.
Use require() or require_once() to include code that is essential for
the functionality of the script (as failure of inclusion will cause the
script to exit with a fatal error).
Use include() or include_once() if you want the script to be continued
if the inclusion fails.
HTH
Markus
Navigation:
[Reply to this message]
|