我一直在使用PHP腳本將數據從我的數據庫(mysql)導出到XLS文件。使用PHP導出XLS文件時的Google Chrome錯誤
儘管文件導出過程在Firefox和IE上運行良好。
嘗試使用Google Chrome進行導出時出現錯誤。
谷歌Chrome的錯誤是
Duplicate headers received from server
The response from the server contained duplicate headers. This problem is generally the result of a misconfigured website or proxy. Only the website or proxy administrator can fix this issue.
Error 349 (net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION): Multiple distinct Content-Disposition headers received. This is disallowed to protect against HTTP response splitting attacks.
我需要在此方面的援助。
感謝
HTTP響應頭有問題。使用[Fiddler](http://fiddler2.com)捕獲HTTP頭並將其發佈到此處。 – flowfree
發生在我身上。通過從文件名中刪除逗號來修復它 –
另一個答案改變'header(「Content-Disposition:attachment; filename = {$ file}」);'to header(「Content-Disposition:attachment; filename = \」{$文件} \「」);' –