$this->cache_control();
return parent::error($msg, $url, $data, $wait);
}
protected function cache_control($time = null) {
if (empty($time))
$time = 60 * 60 * 24;
header ("Last-Modified: " .gmdate("D, d M Y H:i:s", time() )." GMT");
header ("Expires: " .gmdate("D, d M Y H:i:s", time() + $time )." GMT");
header ("Cache-Control: max-age=$time");
}
因为我的后台用了if
最佳答案