I am trying to run some of my code by each time, i am getting this error, i am using the lates version of php. i replaced my caused as per the error; from this
function __autoload($class_name) { $class_name = strtolower($class_name); $path = LIB_PATH.DS."{$class_name}.php"; if(file_exists($path)){ require_once($path); }else{ die("The file {$class_name}.php could not be found."); }
to this
function spl_autoload_register($class_name) { $class_name = strtolower($class_name); $path = LIB_PATH.DS."{$class_name}.php"; if(file_exists($path)){ require_once($path); }else{ die("The file {$class_name}.php could not be found."); } then got another error message
Fatal error: Cannot redeclare spl_autoload_register() in D:\XAMPP\htdocs\marimar\includes\functions.php on line 37 Any help on how to solve this. here is the complete code: https://www.mediafire.com/file/l1hwccshou9dhjh/functions.php/filet