I'm using the following snippet to auto-load my php classes
spl_autoload_register(function ($path) {
$path = strtolower(str_replace('\\', '/', $path));
require_once "./$path.class.php";
});
now that i'm using my classes like this use Core\ClassA as ClassA;
or use ABC\ClassBBC as ClassBBC
it's working perfectly.
but when i want to create a new instance of the php built-in class mysqli
i get the following warning:
Warning: require_once(./mysqli.class.php): failed to open stream: No such file or directory in /var/www/html/projectA/autoloader.php on line 9
how can i enforce the auto-loader to load mysqli
regardless of my auto-loader?