分类:PHP 发布时间:2018-05-02 18:07:00
1、最简方案 ``` header('Content-type:application/vnd.ms-excel'); //文件类型 header('Content-Type:application/download'); //强制下载,可省略 header('Content-Disposition: attachment; filename="文章列表.xls"'); //下载文件名 echo '123456'; //要导出内容,可以用 table标签 绘制表格 ``` 大文件可以参考配置 <a href="http://php.net/manual/zh/function.header.php#86554">PHP: header - Manual</a> 2、插件方案 - <a href="https://github.com/PHPOffice/PHPExcel">PHPExcel 插件</a> - <a href="https://laravel-excel.maatwebsite.nl/docs/2.1/getting-started/installation">laravel excel</a>
搜索
文章分类
最新文章