Error page

You can create custom http error pages (404, 502 etc). Create templates:

  1. layouts/error.php
  2. system/error.php

Example:

system/error.php:


<?php $messages = array(
    
404 => "Page not found",
    
503 => "Server busy",
)
?>
<h1><?=$e->status?></h1>
<p><?=isset($messages[$e->status]) ? $messages[$e->status] : "Unknown error"?></p>

layouts/error.php:


<?=$content ?>