1. Include generates a warning when the file is not saved and the script will continue to execute.
Require causes a fatal error and the script stops executing.
2, include () is a conditional include function, and require () is an unconditional include function.
3. Include has a return value, and require has no
4. Include () files that need to be referenced every time they are executed are read and evaluated.
Require () executes a file that needs to be referenced only once (the Require () statement is actually replaced with the file content to be referenced when executing)
You can see that if you have code that contains one of these directives and code that might execute multiple times, using require () is a high efficiency,
If you read different files each time you execute the code or have loops that pass through a set of file iterations, use the Include (),
Require usually use the method, this function is usually placed in the front of the PHP program, the PHP program before execution, will be read into the require specified by the introduction of the file, so that it becomes a part of the PHP program page. Commonly used functions, you can also use this method to introduce it into the Web page.
Include typically uses methods, which are generally placed in the processing part of the process control. The PHP Program page reads the include file before it is read in. This way, you can simplify the process of executing the program