How do I get csv file to download on IE? Works on firefox

后端 未结 12 534
梦如初夏
梦如初夏 2020-12-02 10:10

I\'m struggling with an odd error. I have a simple web app that grabs stuff from a DB then outputs it as a downloadable csv file. It works on firefox and chrome, but IE fail

12条回答
  •  没有蜡笔的小新
    2020-12-02 10:50

    The only extra code I had to add for IE to work with SSL was: header("Pragma: public"); So my headers look like this now:

     header("Pragma: public");  
     header("Content-Type: application/octet-stream");
     header("Content-Disposition: attachment; filename=some_filename.csv");
    

提交回复
热议问题