include() and require() allow you to insert a file multiple times within a single execution lifetime. On the other hand, include_once() and require_once() make sure one file is inserted only once in a single execution lifetime, even if the code calls them multiple times.
If PHP interpreter fails to include a file in response to a call of include() or include_once(), a Warning is generated and execution continues without that file whereas failure to include a file called by require() or require_once() generates a Fatal Error and execution stops immediately.
This blog provides some ready-made tips, tricks, tweaks & interview questions-answers on C, C++, Perl, Shell Scripting and UNIX Commands.
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment