Recently, it was discovered in the project that PHP's __autoload method is invalid. After debugging for a long time, I couldn't figure it out. After checking the information, I found out that it was Smarty. The new version of Smarty changes the way autoload is performed.
The solution is: add a piece of code after Smarty’s included class file, spl_autoload_register("__autoload");
as follows:
Define('ROOT_PATH', dirname(__FILE__));
require_once ROOT_PATH . '/includes/smarty/Smarty.class.php';
spl_autoload_register("__autoload"); // Add this code
?>
Excerpted from Lee.’s column