search

Home  >  Q&A  >  body text

Export file download, console output garbled code

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

But if

$writer->save('filename' );

can be saved directly in the root directory, but cannot be downloaded

夏日飞霜夏日飞霜1582 days ago1166

reply all(1)I'll reply

  • 天蓬老师

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

    Code and error message, screenshots will be sent

    reply
    0
  • Cancelreply