本文介绍了download-header在IE中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我尝试提供我的脚本标题,以便输出文本将在客户浏览器的 下载而不显示。但它在我的IE中根本不起作用 6和Opera。 < ;? header(" ; Content-Type:application / octet-stream"); header(" Content-Length:5"); header(" Content-Transfer-Encoding :binary"); header(" Content-Disposition:attachment; filename = \" gamedata.txt \""); echo" hello"; ?> 我的系统上安装了Apache 1,可能是 配置错误并以错误的方式发送标头?我怎么能改变这个? 请帮助, 再见, FrankHi,i try to give my script headers so the output text would be downloaded inthe client''s browser and not displayed. But it doesn''t work at all in my IE6 and Opera.<?header("Content-Type: application/octet-stream");header("Content-Length: 5");header("Content-Transfer-Encoding: binary");header("Content-Disposition: attachment; filename=\"gamedata.txt\"");echo "hello";?>I have an Apache 1 installed on my system, can it be that it ismisconfigured and sends the headers in a wrong way? How can i change this?Help please,bye,Frank推荐答案 IE需要特殊的标题。阅读上的说明 http://in.php.net/header <?php header(''Content-Type:XXXXXXXXXXXXXX''); // IE需要特定标题 if(strstr(IE needs special headers. Read the notes at http://in.php.net/header<?phpheader(''Content-Type: XXXXXXXXXXXXXX'');//IE need specific headerif (strstr( 这篇关于download-header在IE中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-02 07:11