网站制作学习网PHP→正文:php禁用缓存
字体:

php禁用缓存

PHP 2009/12/11 9:15:19  点击:不统计


以前常提到asp禁用缓存,php怎么禁用缓存呢?基本和asp差不多,看下面代码
这是页面代码
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
<META HTTP-EQUIV="expires" CONTENT="0">
 这是php代码
 <?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
?>
www.forasp.cn总结

·上一篇:php获取文件mime >>    ·下一篇:PHP实现下载 >>
推荐文章
最新文章