您的位置 首页 php

php7.3 导出订单 报错 500

 $objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');  

改成下方即可

 $objWriter = IOFactory::createWriter($objPHPExcel, 'Excel2007');  
    //$objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');  php7之前
        $objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');

// 从浏览器直接输出$filename
header('Content-Type:application/csv;charset=UTF-8');
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-excel;");
header("Content-Type:application/octet-stream");
header("Content-Type:application/download");
header('Content-Disposition: attachment;filename="'.$name.'.xls"');
header("Content-Transfer-Encoding:binary");
$objWriter->save('php://output');  

文章来源:智云一二三科技

文章标题:php7.3 导出订单 报错 500

文章地址:https://www.zhihuclub.com/152534.shtml

关于作者: 智云科技

热门文章

网站地图