Re: [请益] 下载zip 变成 zip.html

楼主: localhost (127.0.0.1)   2015-05-18 10:33:22
这段语法我试过 实际上没什么问题
你的zip档里面是不是放著zip.html
safari会自己解压缩 你要去偏好设定里面把他关掉
http://i.imgur.com/PIuJSQO.png 把打勾取消掉
※ 引述《kiey (炼)》之铭言:
: 用了下面这段 code 下载后
: header("Pragma: public");
: header("Expires: 0");
: header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
: header("Cache-Control: public");
: header("Content-Description: File Transfer");
: header("Content-Type: application/zip");
: $header="Content-Disposition: attachment; filename=".$zipFileName.";";
: header($header );
: header("Content-Transfer-Encoding: binary");
: header("Content-Length: ".$len);
: @readfile($zipFileName);
: chrome 正常是 .zip
: 可是 safari 却变成 .zip.html
: 不知道各位先进是否有遇到过这问题?

Links booklink

Contact Us: admin [ a t ] ucptt.com