http协议的Last-Modified

$modified_time = $_SERVER['HTTP_IF_MODIFIED_SINCE'];
if (strtotime($modified_time) + 3600 > time()) {
    header("HTTP/1.1 304");
    exit(1);
}
header('Last-Modified:'.gmdate("D, d M Y H:i:s")."GMT");
echo time();

 

posted @ 2015-06-07 11:28  北京流浪儿  阅读(1146)  评论(0编辑  收藏  举报