乐心
Always dream. Always explore.
乐心的博客

csv
文章归档

php导出csv打开乱码问题解决

$transaction_excel_fp = fopen($transaction_excel_path, 'w'); fwrite($transaction_excel_fp,chr(0xEF).chr(0xBB).chr(0xBF)); fputcsv($cashback_excel_fp, [ 'aaa', 'bbb', ]); fclose($cashback_excel_fp); //顺带一个知识点 csv处理成纯文本显示protected function convertNumberToStringForExcel($value) { return '=("' . $value . '")'; }

21   2018-02-06