zishan0215 / attendance

Attendance Management System for Computer Departement, JMI
Other
40 stars 128 forks source link

spl_autoload_register #57

Open aliwaqas333 opened 5 years ago

aliwaqas333 commented 5 years ago

Fatal error: Cannot redeclare spl_autoload_register() in C:\xampp\htdocs\jmiams\application\config\config.php on line 10

i solved this by changing the config.php file to if ( ! function_exists(' spl_autoload_register')) {

function spl_autoload_register($classname) {
    if (strpos($classname, 'CI_') !== 0) {
        $file = APPPATH . 'libraries/' . $classname . '.php';
        if (file_exists($file) && is_file($file)) {
            @include_once($file);
        }
    }
}
}

But then i am getting more error