Exemple #1
0
$page = $pages[$site->uri_path];
if ($site->is_image()) {
    $page = "image.php";
}
if ($page) {
    $site->html = $site->load_page($page);
} else {
    $site->html = $site->load_page('404.php');
    $site->status = 404;
}
if ($site->status == 404) {
    header("HTTP/1.1 404 Not Found");
} else {
    header("HTTP/1.1 200 OK");
}
if ($site->is_ajax() || $site->is_image()) {
    $contents = $site->html;
} else {
    $contents = $site->render();
}
header("Cache-Control: no-cache, must-revalidate");
// HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
// Date in the past
// print $contents;
$site->print_gzip($contents);
exit;
function xdebug($str)
{
    die($str);
}