<?
header('Content-Type:application/vnd.ms-excel');
header("Content-Disposition:filename=test.xls");
include_once('tbs_class.php') ;
include_once('tbs_plugin_html.php');
include_once('config.php') ;
include_once('function.php') ;
$conn=linkDateBase($datebase);
$sql = "SELECT * FROM area order by id";
$result = mysql_query($sql,$conn) or die("SELECT Error:2 : " . mysql_error($conn));
echo iconv("utf-8","gb2312","编号/t");
echo iconv("utf-8","gb2312","区域/t/n");
while ($row = mysql_fetch_assoc($result)){
echo iconv("utf-8","gb2312",$row["id"]."/t");/
echo iconv("utf-8","gb2312",$row["name"]."/t/n");
}
?>
php生成EXCEL文件
最新推荐文章于 2024-09-11 11:00:10 发布