header('Content-Encoding: UTF-8');
header("Content-type: text/csv;charset=UTF-8");
header("Content-Disposition: attachment; filename={$file_name}.csv");
header("Pragma: no-cache");
header("Expires: 0");
$bom = chr(0xEF).chr(0xBB).chr(0xBF);
exit($bom.$str);
标签:Content,UTF,导出,乱码,header,chr,csv
From: https://www.cnblogs.com/xjcyue/p/17325641.html