$str = "订单号,消费场馆,卡号,流水类型,时间\n";
$str = iconv('utf-8', 'gb2312', $str);
foreach ($rs['list'] as $key=>$value)
{
$record_order_no = iconv('utf-8', 'gb2312', $value['record_order_no']);
$stadium_name = iconv('utf-8', 'gb2312', $value['stadium_name']); //中文转码
$card_num = iconv('utf-8', 'gb2312', $value['card_num']); //中文转码
$record_money_type_str = iconv('utf-8', 'gb2312//IGNORE',$value['record_money_type_str']);
$c_time = iconv('utf-8', 'gb2312', $value['c_time']);
$str .= "\t" . $record_order_no . "\t" . "," .$stadium_name . "," . $card_num . "," . $record_money_type_str . "," . $c_time . "\n"; //用引文逗号分开
}
$name = '/Api/memberRecord/' . "会员卡金额变动记录" . date("Ymd", $start_date) . "-" . date("Ymd", $end_date);
$url = Export::p($str, $name);
$download['url'] = 'Data'.$name.'.csv';