您好,欢迎访问一九零五行业门户网

php header功能的使用_PHP教程

header() 函数向客户端发送原始的 http 报头。
复制代码 代码如下:
header('content-transfer-encoding: binary');
readfile('example.zip');//读取文件到客户端
//禁用页面缓存
header('cache-control: no-cache, no-store, max-age=0, must-revalidate');
header('expires: mon, 26 jul 1997 05:00:00 gmt');
header('pragma: no-cache');
//设置页面头信息
header('content-type: text/html; charset=iso-8859-1');
header('content-type: text/html; charset=utf-8');
header('content-type: text/plain');
header('content-type: image/jpeg');
header('content-type: application/zip');
header('content-type: application/pdf');
header('content-type: audio/mpeg');
header('content-type: application/x-shockwave-flash');
//.... 至于content-type 的值 可以去查查 w3c 的文档库,那里很丰富
?>
http://www.bkjia.com/phpjc/824977.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/824977.htmltecharticleheader() 函数向客户端发送原始的 http 报头。 复制代码 代码如下: ?php //200 正常状态 header('http/1.1 200 ok'); // 301 永久重定向,记得在后面要加...
其它类似信息

推荐信息