时间:2021-07-01 10:21:17 帮助过:18人阅读
输出到浏览器 $fp = fopen('php://output', 'a'); //表头 $column_name = array('topic_id','cat_id','user_id','is_best','is_top','topic_title','topic_content','topic_img','hits','total_reply_count','created_time','last_updated_time','topic_status','last_reply_name'); // 将中文标题转换编码,否则乱码 foreach ($column_name as $i => $v) { $column_name[$i] = iconv('utf-8', 'gbk', $v); } // 将标题名称通过fputcsv写到文件句柄 fputcsv($fp, $column_name); $pagecount = 10000;//一次读取多少条 $totalcount = getTotalCount();//总记录数 $sql = "select * from medsci_edu_public_medsciedu_topic"; for ($i=0;$i结果测试:
版权声明:本文为博主原创文章,未经博主允许不得转载。