All 4 have the meaning of the containing file, but the include () and include_once () will continue to execute when there is an error in the include file, while require () and require_once () will not, in addition include_once () and Require_ Once () is included only once and the extra is not included. Example:
$a = 5;
Include ('./test.php ');//test.php code is $a+=3;
Require ('./test.php ');
echo $a;//result is 8;
When there is a nonexistent file test1.php
Include ('./test1.php ');//Results hint warning, and output 5;
Require ('./test1.php ');//result prompt error fatal errors and stop program execution down
echo $a;
Include_once ('./test.php ');
Include_once ('./test.php ');
Include_once ('./test.php ');
Include_once ('./test.php ');
echo $a;
The result is output 8, because include_once () or require_once () if there are more than one, only the first one is executed. The include () or require () will be executed if there are multiple