zoukankan      html  css  js  c++  java
  • php常用HEADER头记录

    <?php    
        
     //设置此页面的过期时间(用格林威治时间表示),只要是已经过去的日期即可。    
     header("Expires: Mon, 26 Jul 1970 05:00:00 GMT");      
        
     //设置此页面的最后更新日期(用格林威治时间表示)为当天,可以强制浏览器获取最新资料     
     header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");      
        
     //告诉客户端浏览器不使用缓存,HTTP 1.1 协议     
    header("Cache-Control: no-cache, must-revalidate");      
       
    //告诉客户端浏览器不使用缓存,兼容HTTP 1.0 协议     
    header("Pragma: no-cache");    
       
    ?>   

    有些技术比如:AJAX 默认使用缓存。 所以,为了看到效果。 直接得禁止使用缓存。

    Header("Content-Type:text/html;charset=utf-8");

    header("http/1.1 403 Forbidden");

    header("Location:http://www.baidu.com");    header("Location:../index.php");

    header('HTTP/1.1 404 Not Found'); 
    header("status: 404 Not Found"); 

    header('HTTP/1.1 401 Unauthorized'); 
    header('status: 401 Unauthorized'); 

    ini_set('memory_limit','-1');
    ini_set("auto_detect_line_endings", true);
    set_time_limit(0);

  • 相关阅读:
    Spring 增强类型
    Spring IOC及Bean的生命周期
    Spring
    Mybatis注解
    MyBatis关联查询
    LoadRunner(1)
    Selenium(6)
    Selenium(5)
    Selenium(4)
    Selenium(3)
  • 原文地址:https://www.cnblogs.com/qunshu/p/3123051.html
Copyright © 2011-2022 走看看