webCOMAND

view::show_404()

Produce a 404 Not Found response and exit, which is useful when a controller cannot locate a requested resource.

This method will send the error response and terminate PHP execution, so it never returns.

Prototype

static void show_404(string $message = '', string $filename = NULL)

Parameters

  • message - Message to display on 404 page.  Can contain HTML.
  • filename - Path to a cMVC view that will receive the message as $message.

Example

\io_comand_mvc\view::show_404('Object Not Found');