So i have an mvc php project and i have a core.php that has an __autoload function that loads my controller and model classes like this:
<?php
function __autoload($classname) {
if (strhas($classname, "Model")) {
$filename = str_replace("Model", "", $classname);
$filename = strtolower($filename);
require_once("mvc/model/$filename.php");
return;
}
if (strhas($classname, "Controller")) {
$filename = str_replace("Controller", "", $classname);
$filename = strtolower($filename);
require_once("mvc/controller/$filename.php");
return;
}
}
but after installing JSON web token (JWT) and composer my __autoload function no longer works and my controllers are no longer found.
this is my project structure:
index.php
system/
-core.php
-loader.php
-...
mvc/
-controller/
--...
-model/
--...
...