Home » HTTP相关知识 » header Content-Disposition参数说明
header Content-Disposition参数说明
2009-02-27 11:00:39 | 才被看了1,783次 | 要评论?
分类: HTTP相关知识 | 发布: OurApache | 来源:这一技客
Tags: Content-Disposition,header
Content-Disposition参数:
attachment — 作为附件下载
inline — 在线打开
具体使用如:header(“Content-Disposition: inline; filename=文件名.mp3″);
需要注意以下几个问题:
Content-disposition是MIME协议的扩展,由于多方面的安全性考虑没有被标准化,所以可能某些浏览器不支持,比如说IE4.01
我们可以使用程序来使用它,也可以在web服务器(比如IIS)上使用它,只需要在http header上做相应的设置即可
