diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2024-02-09 19:27:58 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2024-02-09 19:27:58 +0300 |
commit | af1044821c155221a316e0fe0ee9bdc5d4c5ac1d (patch) | |
tree | 3ed00ec89dcd13cf9e98a40e64508571eb4a9ee0 /skin/error.phps | |
parent | 198ecc0c847f42827db44e06252384cb48457ef8 (diff) | |
parent | 9dd2345ecfff4f7d65ec106a8aee8d866c972585 (diff) |
Diffstat (limited to 'skin/error.phps')
-rw-r--r-- | skin/error.phps | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/skin/error.phps b/skin/error.phps new file mode 100644 index 0000000..8f7e4c7 --- /dev/null +++ b/skin/error.phps @@ -0,0 +1,23 @@ +<?php + +namespace skin\error; + +use Stringable; + +function http_error($ctx, + int $code, + string|Stringable $title, + string|Stringable|null $message = null) { +return <<<HTML +<html> + <head><title>$code $title</title></head> + <body> + <center><h1>$code $title</h1></center> + {$ctx->if_true($message, + '<hr><p align="center">'.$message.'</p>' + )} + </body> +</html> +HTML; + +}
\ No newline at end of file |