现在的位置: 我的问答 >php导出excel头部header怎么写

php导出excel头部header怎么写

2015-10-12 23:47 ⁄ 被浏览 3249

php导出excel头部(header)声明格式为:


header("Content-type:application/vnd.ms-excel");

header("Content-Disposition:filename=reson.xls");


两行代码搞定,把第二行中的reson.xls改成自己需要的文件名即可。