php生成excel文档

<?php

/*http://www.jb51.net/article/22199.htm*/
header("Content-type: text/html; charset=utf-8");

 

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

 

posted on 2017-07-12 17:53  醉半仙  阅读(72)  评论(0编辑  收藏  举报

导航