Autoload fix

This commit is contained in:
Olusesan Ameye
2020-08-14 04:09:47 -04:00
parent 70d45741a1
commit dde9afa5c6
2 changed files with 21 additions and 2 deletions
+11 -1
View File
@@ -1,6 +1,16 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
spl_autoload_register(function($classname) {
if (strpos($classname, 'CL_') !== 0) {
$file = APPPATH . 'libraries/' . $classname . '.php';
if (file_exists($file) && is_file($file)) {
@include_once($file);
}
}
});
/*
function __autoload($classname) {
if (strpos($classname, 'CL_') !== 0) {
@@ -10,7 +20,7 @@ function __autoload($classname) {
}
}
}
*/
///home/sameye/mermsemr/adminwww/application/config
/*
+10 -1
View File
@@ -1,6 +1,15 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
spl_autoload_register(function($classname) {
if (strpos($classname, 'CL_') !== 0) {
$file = APPPATH . 'libraries/' . $classname . '.php';
if (file_exists($file) && is_file($file)) {
@include_once($file);
}
}
});
/*
function __autoload($classname) {
if (strpos($classname, 'CL_') !== 0) {
@@ -10,7 +19,7 @@ function __autoload($classname) {
}
}
}
*/
///home/sameye/mermsemr/providerwww/application/config
/*