|
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"' ); |
|
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' )){ |
|
$mobile= $row[ 'mobile' ]; //循环 |
|
iconv( 'utf-8' , 'gb2312' ,$name), |
|
iconv( 'utf-8' , 'gb2312' ,$mobile) |
|
fputcsv($output, $arrkeys); |
|
fclose($output) or die( "can't close " ); |
|