由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
BuildingWeb版 - 请问如何让IE提示将CGI返回的结果保存为文件?
相关主题
动态生成pdf一问difference:HTTP 200 OK and 201 Created
我是怎样维护和制作这个站点的[转载]请教发送email时如何隐藏IP地址?
perl cgis: how to send back frame webpage?我想用mail.xxxxxx.com来查webmail
[转载] 呵呵。询问一把高人我建立的免费HOSTING空间 www.allokhost.com
这段程序怎么老出错?请教cgi程序问题
请教一个cgi的newbie问题本板宗旨
FORM中用POST时数据是怎么打包传送的?about project 1
[转载] 怎么样不通过Browser 从java program直接提交信息About "include"
相关话题的讨论汇总
话题: content话题: ie话题: octet话题: cgi
进入BuildingWeb版参与讨论
1 (共1页)
b*****y
发帖数: 1
1
我写了一个CGI程序,
返回的串开始为"Content-type:application/octet-stream\n\n",
然后是具体内容.
当我用Netscape请求时, 浏览器提示我保存文件; 但用IE访问时, 它
将结果直接显示在页面上了, 怎样让它也能提示我保存?
多谢指教.
a*p
发帖数: 62
2
my php:
header("Content-Type: application/octet-stream");
header("Content-Length: ".filesize($processfilename));
header("Content-Disposition: attachment;
filename=".basename($processfilename));
readfile($processfilename);
My experiences is IE is not as capable as Netscape in
handling octet-stream
this code probably doesn't work in IE5.5
you can use NetXRay to detect what's going on if you click
attachment in webmail
or you can check HTTP RFC for exact answer.
Unfortunately as far as I know, ther

【在 b*****y 的大作中提到】
: 我写了一个CGI程序,
: 返回的串开始为"Content-type:application/octet-stream\n\n",
: 然后是具体内容.
: 当我用Netscape请求时, 浏览器提示我保存文件; 但用IE访问时, 它
: 将结果直接显示在页面上了, 怎样让它也能提示我保存?
: 多谢指教.

1 (共1页)
进入BuildingWeb版参与讨论
相关主题
About "include"这段程序怎么老出错?
layer question请教一个cgi的newbie问题
css 一 问FORM中用POST时数据是怎么打包传送的?
Help Please for learning to build E-commerce website[转载] 怎么样不通过Browser 从java program直接提交信息
动态生成pdf一问difference:HTTP 200 OK and 201 Created
我是怎样维护和制作这个站点的[转载]请教发送email时如何隐藏IP地址?
perl cgis: how to send back frame webpage?我想用mail.xxxxxx.com来查webmail
[转载] 呵呵。询问一把高人我建立的免费HOSTING空间 www.allokhost.com
相关话题的讨论汇总
话题: content话题: ie话题: octet话题: cgi