Приведите мне пример когда нужно два автозагрузчика spl_autoload_register()
Не хватает воаброжения для чего нужно больше
function autoload_models ($class_name) {
$file = MODELS.$class_name.'.php';
if (file_exists($file)) {
require($file);
}
}
function autoload_controllers ($class_name) {
$file = CONTROLLERS.$class_name.'.php';
if (file_exists($file)) {
require($file);
}
}
spl_autoload_register('autoload_models');
spl_autoload_register('autoload_controllers');
Цитата (gam0ra @ 16.06.2015 - 21:12) |
Invis1ble stump пример в студию) |