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访问时, 它 : 将结果直接显示在页面上了, 怎样让它也能提示我保存? : 多谢指教.
|
|