Home  >  Article  >  Backend Development  >  php读取数据库内容保存到excel里解决思路

php读取数据库内容保存到excel里解决思路

WBOY
WBOYOriginal
2016-06-13 13:34:16727browse

php读取数据库内容保存到excel里
求教下,按照字段保存到一个表格了

------解决方案--------------------

PHP code
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=test.xls");
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n"; 
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn