|
<?php
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename=demo.xls');
header('Pragma: no-cache');
header('Expires: 0');
|
转载于:https://www.cnblogs.com/qjyking/p/5671294.html
本文详细介绍了使用PHP语言实现导出Excel文件的具体方法,包括设置响应头以确保浏览器正确解析和下载Excel文件。通过实例代码展示了如何创建一个名为'demo.xls'的Excel文件并使其能在浏览器上直接下载。
|
<?php
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename=demo.xls');
header('Pragma: no-cache');
header('Expires: 0');
|
转载于:https://www.cnblogs.com/qjyking/p/5671294.html
3503
1878
1061

被折叠的 条评论
为什么被折叠?