html5中文学习网

您的位置: 首页 > 网络编程 > PHP编程 » 正文

能自动生成excel格式文件吗_PHP教程_编程技术

[ ] 已经帮助:人解决问题
excel|生成excel

我是着处理的
<?
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=test.xls");
echo "编 号/t";
echo "公司名称/t";
echo "房 间 号/t";
echo "入驻日期/t";
echo "联 系 人/t";
echo "联系电话";
include("include/global.php");
$sql = "select id,company,roomid,indate,telephone,contanctman from company_info";
$db->query($sql);
$i = 0;
while($db->records())
{
echo "/n";
echo $db->get('id');
echo "/t";
echo $db->get('company');
echo "/t";
echo $db->get('roomid');
echo "/t";
echo $db->get('indate');
echo "/t";
echo $db->get('contanctman');
echo "/t";
echo $db->get('telephone');
}
$i++;

?>


__________________

水中的鱼,自由自在的呼吸。


Ts4HTML5中文学习网 - HTML5先行者学习网
Ts4HTML5中文学习网 - HTML5先行者学习网
(责任编辑:)
推荐书籍
推荐资讯
关于HTML5先行者 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 人才招聘 - 帮助