PHP header函数大全

header('Content-Type: text/html; charset=utf-8');
header('Location: http://www.php-note.com/');
<?php
// fix 404 pages:
header('HTTP/1.1 200 OK'); // set 404 header:
header('HTTP/1.1 404 Not Found'); // set Moved Permanently header ('good for redrictions')
// use with location header
header('HTTP/1.1 301 Moved Permanently'); // redirect to a new location:
header('Location: http://www.php-note.com/'); // redrict with delay:
header('Refresh: 10; url=http://www.php-note.com/');
//print You will be redirected in 10 seconds; // you could also use the HTML syntax:// <meta http-equiv="refresh" content="10;http://www.php-note.com/ /> // override X-Powered-By: PHP:
header('X-Powered-By: PHP/4.4.0');
header('X-Powered-By: Brain/0.6b'); // content language ('en = English')
header('Content-language: en'); // last modified ('good for caching')
$time = time('') – 60; // or filemtime('$fn'), etc
header('Last-Modified: .gmdate("D, d M Y H:i:s, ' . $time . '"). GMT'); // header for telling the browser that the content
// did not get changed
header('HTTP/1.1 304 Not Modified'); // set content length ('good for caching'):
header('Content-Length: 1234'); // Headers for an download:
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="example.zip"');
header('Content-Transfer-Encoding: binary'); // load the file to send:readfile('example.zip');
// Disable caching of the current document:
header('Cache-Control: no-cache, no-store, max-age=0, must-revalidate');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
// Date in the pastheader('Pragma: no-cache'); // set content type:
header('Content-Type: text/html; charset=iso-8859-1');
header('Content-Type: text/html; charset=utf-8'); // plain text file
header('Content-Type: text/plain'); // JPG picture
header('Content-Type: image/jpeg'); // ZIP file
header('Content-Type: application/zip'); // PDF file
header('Content-Type: application/pdf'); header('Content-Type: audio/mpeg'); // Audio MPEG ('MP3,…') file
header('Content-Type: application/x-shockwave-flash'); // Flash animation// show sign in box
header('HTTP/1.1 401 Unauthorized');
header('WWW-Authenticate: Basic realm="Top Secret"');
//print Text that will be displayed if the user hits cancel or ;
//print enters wrong login data;
?>

页面跳转中。。。

<?php
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
echo '<html xmlns="http://www.w3.org/1999/xhtml">';
echo '<head>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
echo '<meta http-equiv="refresh" content="0;url=' . oppo_sync_logout . '" />';
echo '<title>页面跳转中...</title>';
echo '</head>';
echo '<body>';
echo ' <div style="text-align:left;margin-top:10px;">页面跳转中...</div>';
echo '</body>';
echo '</html>';
die();
?>

PHP header函数大全的更多相关文章

  1. PHP header函数使用大全

    PHP header函数大全 header('Content-Type: text/html; charset=utf-8'); header('Location: http://52php.cnbl ...

  2. jquery 函数大全

    jquery函数大全转载  Attribute:$(”p”).addClass(css中定义的样式类型); 给某个元素添加样式$(”img”).attr({src:”test.jpg”,alt:”te ...

  3. LoadRunner 函数大全之中文解释

    LoadRunner 函数大全之中文解释 // sapgui_table_set_column_selected 模拟用户 // 单击表中的列标题. int sapgui_table_set_colu ...

  4. PHP文件操作功能函数大全

    PHP文件操作功能函数大全 <?php /* 转换字节大小 */ function transByte($size){ $arr=array("B","KB&quo ...

  5. 性能测试学习第二天-----loadrunner常用函数大全及设置项

    常用函数大全: 1,C语言参数转web参数 lr_save_string("aaa","param"):将字符串“aaa”或者一个字符串变量,转变成LR的参数{ ...

  6. PHP header函数设置http报文头(设置头部域)

    PHP HTTP 简介: HTTP 函数允许您在其他输出被发送之前,对由 Web 服务器发送到浏览器的信息进行操作. PHP 5 HTTP 函数:header()     向客户端发送原始的 HTTP ...

  7. PHP中的header()函数作用

    PHP 中 header()函数的作用是给客户端发送头信息. 什么是头信息?这里只作简单解释,详细的自己看http协议.在 HTTP协议中,服务器端的回答(response)内容包括两部分:头信息(h ...

  8. 转:Delphi 函数大全

    Delphi 函数大全 - xiucaiyao的专栏 - 博客频道 - CSDN.NEThttp://blog.csdn.net/xiucaiyao/article/details/4544039 名 ...

  9. SQL-2008函数大全

    SQL Server 2008 函数大全(完整版) SQL2008 表达式:是常量.变量.列或函数等与运算符的任意组合.1. 字符串函数 函数 名称 参数 示例 说明 ascii(字符串表达式) se ...

随机推荐

  1. Hadoop 在ubuntu系统上的搭建[图解]

    前言 本文介绍如何在Ubuntu Kylin操作系统上搭建Hadoop平台. 配置 1. 操作系统: Ubuntu Kylin 14.04 2. 编程语言: JDK 1.8 3. 通信协议: SSH ...

  2. 345. Reverse Vowels of a String

    Write a function that takes a string as input and reverse only the vowels of a string. Example 1:Giv ...

  3. VGA DVI HDMI区别

    VGA,DVI,HDMI是目前常用的3种不同显示接口的名称.在树莓派的边缘既有HDMI的接口,也有RCA的接口,而显示器上也是既有DVI,又有VGA.上个月买连接线,没有仔细检查买了一根HDMI对VG ...

  4. 精美的HTML5 Loadding页面

    以前我们大部分的Loading动画都是利用gif图片实现的,这种图片实现Loading动画的方法虽然也很不错,但是作为HTML5开发者来说,如果能利用HTML5和CSS3实现这些超酷的Loading动 ...

  5. JAVA 23种设计模式(转)

    1.FACTORY?追MM少不了请吃饭了,麦当劳的鸡翅和肯德基的鸡翅都是MM爱吃的东西,虽然口味有所不同,但不管你带MM去麦当劳或肯德基,只管向服务员说“来四个鸡翅”就行了.麦当劳和肯德基就是生产鸡翅 ...

  6. leetcode 115 Distinct Subsequences ----- java

    Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence ...

  7. ZOJ-3946 Highway Project (最短路)

    题目大意:一张带权无向图,权有两个参数(d,c),分别表示走过这条边的时间和建造这条边的代价.要求选出一些边,使得0节点到其他点的距离之和最短,并在最短的基础上求最小代价. 题目分析:这是16年浙江省 ...

  8. js类型判断

    console.log('---------------------'); var a="string"; console.log(a); //string var a=1; co ...

  9. 利用redis写webshell

    redis和mongodb我之所见 最近自己在做一些个人的小创作.小项目,其中用到了mongodb和redis,最初可能对这二者没有深入的认识.都是所谓的“非关系型数据库”,有什么区别么? 实际上,在 ...

  10. Java static block static constructor , static field

    http://stackoverflow.com/questions/7121213/singleton-instantiation http://docs.oracle.com/javase/spe ...