Include and Require in PHP

In PHP include() and require() functions are used to include the code in a firl to another PHP file. Using this you ca save lot of time and space/size of server.

Example

include(“filename”);
require(“ilename”);

Difference Between Include and Require

The difference in include and require is — the include() statement will generate a warning but allow script execution to continue if the file to be included can’t be found, whereas the require() statement will generate a fatal error and stops the execution

Leave a Reply

Your email address will not be published. Required fields are marked *