ritaswc / csv-stream-exporter
1.0.0
2022-11-08 03:50 UTC
Requires
- php: >=5.1
README
- Save Memory 节约内存
- Without File Size Limit 不限制文件长度
只能在php-fpm模式
下使用
composer require ritaswc/csv-stream-exporter
$exporter = new \Ritaswc\CsvStream\Exporter('自己定义导出文件名' . date('YmdHis') . '.csv'); $exporter->writeHeaders([ '姓名', '电话' ]); foreach ($lines as $line) { $exporter->writeLine([$line['name'], $line['phone']]); } $exporter = null;