Does anyone know the difference between require_once() and include_once()???
Include_once() will print out an error then continue code execution whereas require_once will print out an error then stop code execution just as there counterparts(require and include) do.
Doesn't really matter a lot but … Include() returns 1 if success and 0 if failure Require() is always called -- even in a conditional - Require is minimally faster than include - Causes the script to fail if it doesn't succeed - Can't return values from a return statement Recommendation: Use require_once() / include_once() - Additional performance overhead to these - Php 4 Only but total lifesaver. (Use autoload in PHP5) - Prevents redeclaration errors i.e. "Cannot redeclare class"
Include_once and require_once stops can't redefine errors when you include the same file twice which can happen with complex programs.
require_once is almost the same thing as saying
if(!include('something.php')) {die();}