在safari浏览器上使用php导出文件失败

修改为以下头部信息

      @header('Content-Description: File Transfer');
        @header('Content-Type: application/octet-stream');
        @header("Content-Type: application/force-download");
        @header('Content-Disposition: attachment; filename=' . $filename);
        @header('Expires: 0');
        @header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
        @header('Pragma: public');
        @header('Content-Length: ' . filesize($filename));

  

posted @ 2021-09-23 12:20  明明一颗大白菜  阅读(81)  评论(0编辑  收藏  举报
<-- -->