diff --git a/application/config/config.php b/application/config/config.php index 809e0a08e..1497e026c 100755 --- a/application/config/config.php +++ b/application/config/config.php @@ -508,9 +508,12 @@ $config['proxy_ips'] = ''; | Autoload Custom Controllers |-------------------------------------------------------------------------- | -Don't work so sometime delete this*/ -function __autoload($class) -{ +| It's working, so don't delete this :D + */ +spl_autoload_register(function ($class) { + + error_log("__autoload"); + if (substr($class,0,3) !== 'CI_' && substr($class,0,4) !== 'FHC_') { if (file_exists($file = APPPATH . 'core/' . $class . '.php')) @@ -518,4 +521,4 @@ function __autoload($class) require_once $file; } } -} \ No newline at end of file +}); \ No newline at end of file