Файл: inc/Request.php
Строк: 24
<?php
// Работа с header
Class Request
{
public static function redirect($redirect) {
header('Location: '.$redirect);
}
public static function js() {
header('Content-Type: text/javascript; charset=utf-8');
}
public static function utf8($plain = false, $al = null) {
if($al) {
$text = ($plain && $al == 1) ? 'plain' : 'html';
header("Content-Type: text/$text; charset=utf-8");
} else {
$text = ($plain) ? 'plain' : 'html';
header("Content-Type: text/$text; charset=utf-8");
}
}
public static function _404() {
header("HTTP/1.0 404 Not Found");
die(include('/view/404.html'));
}
}