

Difference between include, require, include_once and require_once in PHP
source link: https://dev.to/aminesaissihassani/difference-between-include-require-includeonce-and-requireonce-in-php-48ok
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.


Difference between include, require, include_once and require_once in PHP
Aug 2
・1 min read
First of all we should know what is the difference and similarity between include() and require(), include() and require() are used to include other files into a PHP file, and the difference between them are the include() generates a warning when there is an error, but the script will continue execution, otherwise, the require() generates a fatal error, and the script will stop.
The require_once() statement is similar to require() except require_once() will check if the file has already been included, and if so, it will not require it again, same with include_once().
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK