[請益] 下載zip 變成 zip.html
用了下面這段 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
不知道各位先進是否有遇到過這問題?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.175.240.8
※ 文章網址: https://www.ptt.cc/bbs/PHP/M.1430802212.A.429.html
推
05/06 12:45, , 1F
05/06 12:45, 1F
→
05/06 13:27, , 2F
05/06 13:27, 2F
→
05/06 13:27, , 3F
05/06 13:27, 3F
→
05/07 11:06, , 4F
05/07 11:06, 4F
→
05/07 11:06, , 5F
05/07 11:06, 5F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):
PHP 近期熱門文章
PTT數位生活區 即時熱門文章