- ⌂ router
- Methods
- Static Methods
router::show_404()
Respond to the request with a 404 Not Found status code and generic Resource Not Found web page and exit. This is a shortcut to the static method view::show_404().
This method will send the error response and terminate PHP execution, so it never returns.
Prototype
void show_404(string $message = '', string $filename = NULL)
Parameters
- message - Optional message to display on 404 page. Can contain HTML.
- filename - Optional path to a cMVC view that will receive the message as $message.
Example
$router = new \io_comand_mvc\router(['exit'=>FALSE]);
if(!$router->route_request()) {
$router->show_404('Page not found.');
}