首页 话题 小组 问答 好文 用户 我的社区 域名交易 唠叨

[函数]客户端不缓存方法

发布于 2024-06-03 21:08:43
0
95

不缓存方法封装


public function disCache(){
    $ts = gmdate("D, d M Y H:i:s",strtotime('-1 year')) . " GMT";
    header("Expires: $ts");
    header("Last-Modified: $ts");
    header("Pragma: no-cache");
    header("Cache-Control: no-cache, must-revalidate");
}
评论
一个月内的热帖推荐
道亮_(:з」∠)_
Lv.1管理员

404

帖子

30

小组

2177

积分

赞助商广告
站长交流