Web Programming with PHP

7 Including one File into another File

require(file) and include(file) include and evaluate the specified file. The two constructs are identical in every way except how they handle failure:

require_once(file) and include_once(file) are similar to the require() and include() statement, with the only difference being that if the code from a file has already been included, it will not be included again.