Skip to content
Emanuele Minotto edited this page Apr 29, 2016 · 3 revisions

The 404 error is defined as a regular expression too and is matched if no one of currently defined regular expressions match current URL. To retrieve the 404 regular expression call the function with the argument route_not_found (available only if not in CLI mode).

$mf('/', function () {
    echo 'Hello World!';
});

$mf($mf('route_not_found'), function () {
    echo 'Error 404: Page not Found';
});

This is part of the microframework Utilities.

Clone this wiki locally