1. url跳转
    header('Location: https://www.asen7.com');

  2. 声明 conten-type
    header('content-type:text/html;charset=utf-8');

  3. 返回状态码
    header('HTTP/1.1 404 Not Found');

  4. 时间延迟跳转url
    header('Refresh: 5; url=https://www.asen7.com/');  //5秒后跳转

  5. 控制浏览器缓存 时间延迟跳转url
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
    
    header("Cache-Control: no-cache, must-revalidate");
    
    header("Pragma: no-cache");

  6. 执行下载操作 时间延迟跳转url
    header('HTTP/1.1 401 Unauthorized');
    
    header('WWW-Authenticate: Basic realm="Top Secret"');
扫描进入手机浏览

欢迎留言