error_reporting(E_ALL | E_STRICT) ;
ini_set('display_errors', 'On');
$app = new Phalcon\Mvc\Micro();
$app->get('/say/welcome/{name}', function ($name) {
});
$app->handle();
Hi, this usually happens when "The Not-Found handler is not callable or is not defined", you can define a not-found handler for the app in the following way:
$app->notFound(function () use ($app) {
$app->response->setStatusCode(404, "Not Found")->sendHeaders();
echo 'This is crazy, but this page was not found!';
});
http://docs.phalconphp.com/en/latest/reference/micro.html#not-found-handler
Bolsheo thank you. But all describe in a single file is bad. If you create folders and files in them he put them ?
example:
/model1/get.php
/model1/post.php
/model1/put.php
<?php
require 'functions/func1-file.php';
require 'functions/func2-file.php';
$app = new Phalcon\Mvc\Micro();
$app->get('/some/route/{name}', 'func1');
$app->get('/some/route', 'func2');
In functions/func1-file.php:
function func1($name){
}
In functions/func2-file.php:
function func2(){
}
thanks, you can close)
Most helpful comment
Hi, this usually happens when "The Not-Found handler is not callable or is not defined", you can define a not-found handler for the app in the following way:
http://docs.phalconphp.com/en/latest/reference/micro.html#not-found-handler