20,359
社区成员
发帖
与我相关
我的任务
分享
<?php
$cache_time = 60*10; //十分钟缓存
$modified_time = @$_SERVER['HTTP_IF_MODIFIED_SINCE'];
if( strtotime($modified_time)+$cache_time > time() ){
header("HTTP/1.1 304");
exit;
}
header("Last-Modified: ".gmdate("D, d M Y H:i:s", time() )." GMT");
echo "<br />";
echo date('Y-m-d H:i:s',time());
?>