Replies: 1 comment 2 replies
-
You need to add one more route that tells the router where a 404 would go. Have a look at this (method https://docs.phalcon.io/4.0/en/application-micro#not-found-404 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
When I call a route in the index file I always get the following message "PHP Fatal error: Uncaught Phalcon\Mvc\Micro\Exception: Not-Found handler is not callable or is not defined in..."
This is the index.php
use Phalcon\Mvc\Micro; $app = new Micro(); $app->get( '/invoices/view/{id}', function ($id) { echo "<h1>Invoice #{$id}!</h1>"; } ); $app->handle( $_SERVER["REQUEST_URI"] );
This is the request curl -i -X GET http://127.0.0.1/myapp/invoices/view/1
This is the configuration of the server
Can somebody know how to fix this ?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions