error_reporting(E_ALL ^ E_NOTICE);
设置php错误报告的级别,不显示notice,其它全显示下面的是发送HTTP头,还是去看下HTTP协议的文档吧

解决方案 »

  1.   

    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");   //页面过期时间
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");// 最后修改时间
    header("Pragma: no-cache");//设置页面不使用缓存
      

  2.   

    Pragma: no-cache使客户端总能得到最新的页面,这个用过
    其它的学习……
      

  3.   

    这三句完成同一任务
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); //设置页面失效期
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); //设置页面时间,当前时间肯定迟于Mon, 26 Jul 1997 05:00:00 GMT,所以页面进入后就已失效了。再入时浏览器会访问服务器
    header("Pragma: no-cache"); //通知浏览器不使用缓存机制————使客户端总能得到最新的页面由于不同的浏览器对这些http协议支持程度不同,所以这几句通常一起出现
      

  4.   

    header("Pragma: no-cache"); 和session_cache_limiter(nocache);
    有什么区别?
      

  5.   

    session_cache_limiter() returns the name of the current cache limiter. If cache_limiter is specified, the name of the current cache limiter is changed to the new value. 
    You may find that your pages aren't cached even if you don't output all of the headers above. There are a number of options that users may be able to set for their browser that change its default caching behavior. By sending the headers above, you should override any settings that may otherwise cause the output of your script to be cached. Additionally, session_cache_limiter() and the session.cache_limiter configuration setting can be used to automatically generate the correct caching-related headers when sessions are being used.