1: <?php
2: namespace codemania\core;
3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
13: defined('CM_ROOT') or exit('Заперт доступа!');
14:
15: class HTTP {
16: static public $_protocol = 'HTTP/1.0';
17: static public function init() {
18: if (isset($_SERVER['SERVER_PROTOCOL'])) {
19: self::$_protocol = $_SERVER['SERVER_PROTOCOL'];
20: }
21: }
22: static public function ($message, $code = 500) {
23: http_response_code($code);
24: ob_start();
25: ob_implicit_flush(false);
26: include CM_ROOT .'codemania/template/http_error.php';
27: $buffer = ob_get_contents();
28: ob_end_clean();
29: return $buffer;
30: }
31: }