$title = ['粉丝编号','用户名','联系电话','状态','创建时间','订单数量'];
set_time_limit(0);
header('Pragma:public');
header('Expires:0');
header('Cache-Control:must-revalidate,post-check=0,pre-check=0');
header('Content-Type:application/force-download');
header('Content-Type:application/vnd.ms-excel');
header('Content-Type:application/octet-stream');
header('Content-Type:application/download');
header('Content-Type:text/csv');
header('Content-Transfer-Encoding:binary');
header("Content-Disposition:attachment; filename=大数据导出.csv");
//打开文件
$fp = fopen('php://output', 'a');
//数据写入csv文件
fputcsv($fp, $title);
//已经插入1百万数据,查询全部数据
$total = Db::table('user')->where('is_delete',0)->count();
if($total>0 &
PHP大数据导出csv优化,导出出现504处理方式
最新推荐文章于 2023-09-12 13:16:09 发布
