Почему не работает spl_autoload_register в PHP?
Ничего не понимаю, перешерстил документацию вдоль и ничего.
Файлы:
Код:
set_include_path('W:/domains/conf/public_html/');
$dir = get_include_path() . 'classes/' . 'c1' . '.php';
//include $dir; Здесь всё подключается
function load1($class) {
include get_include_path() . 'classes/' . $class . '.php';
}
spl_autoload_register('load1'); // не подключается
new User();
