diff options
Diffstat (limited to 'web/include/errors.php')
-rw-r--r-- | web/include/errors.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/web/include/errors.php b/web/include/errors.php new file mode 100644 index 0000000..1c4656b --- /dev/null +++ b/web/include/errors.php @@ -0,0 +1,17 @@ +<?php +if (!$code) { $code = $_GET['code']; } + +switch($code) { + case 403: + $error['name'] = "Forbidden"; + $error['description'] = "You don't have permission to be here. Go away!"; + break; + case 404: + $error['name'] = "Not Found"; + $error['description'] = "The file was not found. We probably screwed up."; + break; +} +header("HTTP/1.0 $code" . $error['name']); +echo "<h2>$error[name]</h2> +<p>$error[description]</p>"; +?> |