返回的文件,我无法下载通过PHP在我的网站上输出的文件。Firefox 7在升级到Firefox 7后拒绝下载由PHP
一个例子:
比方说,我有联系http://example.com/download/1恢复非常正常800KB .ZIP文件,用:
header("Content-Type: application/octet-stream");
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-Disposition: attachment; filename=" .trim($filename). "");
header("Content-Transfer-Encoding: binary");
header("Content-Length: " .filesize($filePath). ")");
readfile($filePath);
flush();
每一个可能的浏览器,甚至是旧版本的Firefox,开始下载文件通常。 Firefox 7引发“损坏的内容错误”。
有没有人注意到类似的行为?任何可能的解