The difference between phpinclude and require is that php has just been in contact with include and require. it has been checked online for a long time, and many people have compared it. some of them are incorrect and misleading, the most authoritative and correct answer is here: cn. php. netmanualhfunction. include. php. If you still don't understand it, I did the following test: & lt ;? Difference between php include and require
Shortly after I first came into contact with php, I met include and require. I checked them online for a long time and many people compared them. some of them are incorrect and misleading. here is the most authoritative and correct answer: http://cn.php.net/manual/zh/function.demo.php.
If you still don't understand it, I did the following tests,
Scenario 1:
Include ("./est. php"); // est. php does not exist
Echo"
Continue ...";
?>
Test results:
Warning: include (. /est. php): failed to open stream: No such file or directory in... /test1.php on line 2 Warning: include (): Failed opening '. /est. php 'for declaration (include_path = '. :/usr/local/Cellar/php/5.3.10/lib/php') in... /test1.php on line 2
Continue...
Scenario 2:
Require ("./est. php ");
Echo"
Continue ...";
?>
Test results:
Warning: require (. /est. php): failed to open stream: No such file or directory in... /test1.php on line 2 Fatal error: require (): Failed opening required '. /est. php '(include_path = '. :/usr/local/Cellar/php/5.3.10/lib/php') in... /test1.php on line 2
The continue string is not printed.