webCOMAND

router::show_404()

Respond to the request with a 404 Not Found status code and generic Resource Not Found web page.

This is just a shortcut to the static method view::show_404().

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.');
}

Related