diff --git a/core/init/autoload.php b/core/init/autoload.php index 4480949..4c30f57 100644 --- a/core/init/autoload.php +++ b/core/init/autoload.php @@ -10,16 +10,6 @@ $className = str_replace('\\', '/', $className); - if (strpos($className, CONTROLLERS_COMPLEMENT)) { - - if (file_exists(CONTROLLERS_DIRECTORY . $className . '.php')) { - - require (CONTROLLERS_DIRECTORY . $className . '.php'); - - } - - } - if (file_exists(MODELS_DIRECTORY . $className . MODELS_COMPLEMENT . '.php')) { require MODELS_DIRECTORY . $className . MODELS_COMPLEMENT . '.php'; @@ -32,4 +22,10 @@ } + if (file_exists(CONTROLLERS_DIRECTORY . $className . '.php')) { + + require (CONTROLLERS_DIRECTORY . $className . '.php'); + + } + });