|
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="認(rèn)證列表.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' ]; //循環(huán) |
|
iconv( 'utf-8' , 'gb2312' ,$name), |
|
iconv( 'utf-8' , 'gb2312' ,$mobile) |
|
fputcsv($output, $arrkeys); |
|
fclose($output) or die( "can't close " ); |
|