<?php
require_once (dirname(__FILE__) . "/../include/common.inc.php");
$output = fopen('','w') or die("can't open ");
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename="认证列表.csv"');
$arrkeys = array(
iconv('utf-8','gb2312','姓名'),
iconv('utf-8','gb2312','电话')//文件表头
);
fputcsv($output, $arrkeys);
//取得符合条件的数组
$sql = "SELECT * FROM dede_test";
$dsql->Execute('me',$sql);
while($row = $dsql->GetArray('me')){
$name =$row['name'];
$mobile= $row['mobile']; //循环
$arrkeys = array(
iconv('utf-8','gb2312',$name),
iconv('utf-8','gb2312',$mobile)