一.安装PHPExcel 1.下载:PHPExcel https://github.com/PHPOffice/PHPExcel 2.解压后:Classes文件夹改名为PHPExcel 3.把文件夹PHPExcel 放到根目录vendor文件夹下 二.控制器 1.调用PHPExcel use PHPExcel_IOFactory; use PHPExcel; 2.导入 // 导入每日流水 public function posImport(){ header("content-type:tex
1.composer安装: composer require phpoffice/phpspreadsheet 2.点击导出按钮,触发控制器里面的方法 wdjzdc() 3. 在控制中引入 use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Writer\Xlsx; //wdjzdc数据导出 public function wdjzdc() { $spreadsheet = new Spreadsheet(
今天想在TP5上安装workerman,实现一个后台消息提醒功能. 第一步就卡住了,根据手册里说的首先通过composer安装 $ composer require topthink/think-worker 结果报错 $ composer require topthink/think-worker Using version ^2.0 for topthink/think-worker ./composer.json has been updated Loading composer repo