PHP: __autoload function doesn't ever called
问题 So, I have xampp. I tested this code on ZendServer, result the same. <?php error_reporting(E_ALL); define ("ABS_PATH", 'C:\xampp\htdocs\oopHotLine\\'); function __autoload($class_name) { echo 'gg'; require_once (ABS_PATH.'classes\\'.$class_name.'.php'); } $process=new Main('1'); ?> after php.exe -a index.php i have this: Interactive mode enabled Fatal error: Class 'Main' not found in C:\xampp\htdocs\oopHotLine\index.php on line 10 [Finished] so, it doesn shows 'gg' output. If i manually do _