What are the differences between require and include, include_once? ~ Interview Questions & Answers

Wednesday, June 6, 2007

What are the differences between require and include, include_once?

The include_once() statement includes and evaluates the specified file during the execution of the script. This is a behavior similar to the include() statement, with the only difference being that if the code from a file has already been included, it will not be included again. The major difference between include() and require() is that in failure include() produces a warning message whereas require() produces a fatal errors.

0 comments: