搜尋

首頁  >  問答  >  主體

匯出檔案下載,控制台輸出亂碼

  header("Pragma: public");        header("Expires: 0");        header("Cache-Control:must-revalidate, post-check=0, pre-check=0")  . -Type:application/force-download");        header("Content-Type:application/vnd.ms-execl");        header("Content-Type:application/octet-stream"); application/download");;        header('Content-Disposition:attachment;filename='.$fileName.'');        header("Content-Transfer-Encoding:binary");/ ($spreadsheet,'Xlsx');        $writer->save('php://output');

但是如果

#  $writer->save('檔案名稱' );

就可以直接儲存在根目錄,但不能下載

夏日飞霜夏日飞霜1581 天前1162

全部回覆(1)我來回復

  • 天蓬老师

    天蓬老师2020-11-12 14:16:05

    程式碼以及錯誤訊息, 截圖發出來

    回覆
    0
  • 取消回覆