background image
flush();
$cnt = 0;
}
$row = $stmt[$t];
foreach ($row as $i => $v) {
$row[$i] = iconv('utf-8', 'gbk', $v);
}
fputcsv($fp, $row);
}
--------------------------------------------------------------
----
// 导出 www.mntuku.cn 中的文章总数统计
function daochu(){
require_once 'outExcel.class.php';
header("Content-Type: application/vnd.ms-excel;charset=
utf-8");
$kaoheCode = $_GET['kaoheCode'];
$dao = new PerformanceServices();
$kaoheinfo = $dao->getKaoheInfo($kaoheCode);
$filename=$kaoheinfo['KH_NAME']."考核统计";
$encoded_filename = urlencode($filename);
$encoded_filename = str_replace("+", "%20", $encoded_fil
ename);
$ua = $_SERVER["HTTP_USER_AGENT"];
header('Content-Type: application/octet-stream');
if (preg_match("/MSIE/", $ua)) {
header('Content-Disposition: attachment; filename="'
. $encoded_filename . '.xls"');
} else if (preg_match("/Firefox/", $ua)) {
header('Content-Disposition: attachment; filename*="
utf8\'\'' . $filename . '.xls"');
} else {