加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

PHP不缓存数据头

发布时间:2020-12-13 20:29:50 所属栏目:PHP教程 来源:网络整理
导读:PHP不缓存数据头 function nocache_headers(){ //whyarethese@-silencedwhenotherheadercallsarent? @header( Expires:Wed,11Jan198405:00:00GMT ); @header( Last-Modified: . gmdate ( D,dMYH:i:s ). GMT ); @header( Cache-Control:no-cache,must-revalid
PHP不缓存数据头
  1. function nocache_headers() {   
  2.     // why are these @-silenced when other header calls aren't?   
  3.     @header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' );   
  4.     @header( 'Last-Modified: ' . gmdate'D, d M Y H:i:s' ) . ' GMT' );   
  5.     @header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );   
  6.     @header( 'Pragma: no-cache' );   

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读