Неустранимая ошибка: Uncaught ReflectionException: класс «App\Core\Controller\ErrorController» не существует в ...lib/core/Router /mvcRouter.php в строке 146"
Index.php содержит автозагрузчик:
Код: Выделить всё
{...}
function autoload( string $object ) {
$split = explode( '\\', $object );
$className = end( $split );
$file = $className . '.php';
echo "namespace: $object -> file: $file";
/*
output:
...
namespace: App\Core\Controller\ErrorController -> file: ErrorController.php
*/
require_once $file;
}
spl_autoload_register( 'autoload' );
{...}
Код: Выделить всё
$reflector = new ReflectionClass( $this->controller );
Код: Выделить всё
Подробнее здесь: [url]https://stackoverflow.com/questions/79251677/fatal-error-uncaught-reflectionexception-class-does-not-exist-in[/url]
Мобильная версия