当前位置:编程学习 > php >>

PHP生成excel文件

答案:<?
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=test.xls");
echo "test1 ";
echo "test2 ";
echo "test1 ";
echo "test2 ";
echo "test1 ";
echo "test2 ";
echo "test1 ";
echo "test2 ";
echo "test1 ";
echo "test2 ";
echo "test1 ";
echo "test2 ";
?>
//改动相应文件头就可以输出.doc .xls等文件格式了

上一个:PHP时间较检问题
下一个:PHP获取访问者操作系统

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,