2017-02-24 26 views
0

我正在使用Google Chrome打開我的網頁。Google chrome在我下載文件時顯示錯誤

當我下載文件時,我得到:

ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION

在那之後,我去看看我的代碼,我有一個線如下:

header('Content-Disposition: attachment; filename='.$downloadFileName); 

有人可以幫助我,讓我可以下載文件?在雙引號

回答

0

附上文件名:

header('Content-Disposition: attachment; filename="'.$downloadFileName.'"'); 
0

我真的不知道PHP的語法。 假設你的代碼的語法是正確的,我想你可以嘗試:

header('Content-Disposition: attachment; filename=\"'.$downloadFileName.'\"'); 

你需要周圍的文件名雙引號。