优化csv导出默认为不转码

master
chenzhi 5 years ago
parent 5bbe0c1dcd
commit 9b7f3d1104

@ -1748,7 +1748,8 @@ function data2csv(&$data,$title,$fields){
foreach ($data as $row) { foreach ($data as $row) {
$a = []; $a = [];
foreach($field as $k=>$v){ foreach($field as $k=>$v){
$a[$v] = $row[$v] . "\t";//防止格式错误 // $a[$v] = $row[$v] . "\t";//防止格式错误
$a[$v] = $row[$v];
} }
if ($index == 10000) { //每次写入1000条数据清除内存 if ($index == 10000) { //每次写入1000条数据清除内存
$index = 0; $index = 0;

Loading…
Cancel
Save