在header前面加上 ob_end_clean();
ob_end_clean();//清除缓冲区,避免乱码
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="订单列表.xls"');
在header前面加上 ob_end_clean();
ob_end_clean();//清除缓冲区,避免乱码
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="订单列表.xls"');
转载于:https://www.cnblogs.com/wdw31210/p/11017325.html