The difference between require and include in php is as follows. if URLfopenwrappers is configured in the ini configuration file, you can use the URL to contain remote files. The require cannot contain the control structure, and cannot contain the differences between require and include in the return statement php.
- If the URL fopen wrappers is configured in the php. ini configuration file, you can use the URL to include remote file calls.
- The require cannot contain a control structure, nor can it contain a return statement, which may cause a processing error.
- Require will replace the content of the contained file with this point during the first execution, and include will be called again each time. therefore, require cannot contain different files in the cyclic weight.
- Require can access the variables in the current scope
- If an error occurs in require, the system immediately stops running and reports an exception. If include displays an error message, the system continues to run the request.
- In a condition statement, no matter whether the condition is true or not, the contained content will be introduced, even if there is no chance of execution.