$filename = "members".date('Ymd');$member = $this->Members_model->member_for_export();header("Content-type: application/vnd.ms-excel; charset=utf-8");header("Content-Disposition: attachment; filename=$filename.xls");echo iconv('UTF-8', 'GBK', '会员列表') . "\t\n";echo iconv('UTF-8', 'GBK', '编号') ."\t";echo iconv('UTF-8', 'GBK', '电子邮箱')."\t\n";foreach ($member AS $key => $value){ $order_by = $key +1; echo iconv('UTF-8', 'GBK', $order_by). "\t"; echo iconv('UTF-8', 'GBK', $value['email']). "\t"; echo "\n";}exit;
Copy after login