Controller handler class cannot be loaded en Phalcon 4

I created a project using the development tools named rema. When I enter the index

http://localhost/rema/

I get the error message

RemaController handler class cannot be loaded
#0 [internal function]: Phalcon\Mvc\Dispatcher->throwDispatchException('RemaController ...', 2)
#1 [internal function]: Phalcon\Dispatcher\AbstractDispatcher->dispatch()
#2 C:\xampp\htdocs\rema\public\index.php(43): Phalcon\Mvc\Application->handle('/rema/')
#3 {main}

But rema is the name of the project not a controller. In the version of Phalcon 3 I did not have this message. How can i correct it?

In v4, there were changes related to sub-directory detection. In index.php, you need to change value inside handle() method.



74.1k

THIS IS MY FILE <?php $router = $di->getRouter(); // Define your routes here $router->handle($_SERVER['REQUEST_URI']);



74.1k

THIS IS MY FILE



5.2k

your issue is because your phalcon project is not on root folder

you can find the solution here