您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php header功能的使用_PHP教程

2024/6/23 1:27:06发布24次查看
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 永久重定向,记得在后面要加...
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product