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