随笔分类 -  ThinkPHP

摘要:第一步,配置command.php文件,目录在application/command.php <?php return [ 'app\home\command\ClassName', ]; 第二步,建立命令类文件,新建application/common/command/ClassName.php 阅读全文
posted @ 2025-05-11 22:06 鲨鱼大王 阅读(53) 评论(0) 推荐(0)
摘要:创建WxUser Model类 <?php namespace app\api\model; use app\common\controller\Api; use think\Model; // 引入tp框架的Model类 use think\Db; // 引入 tp 框架的Db类 use thin 阅读全文
posted @ 2023-11-23 11:04 鲨鱼大王 阅读(84) 评论(0) 推荐(0)
摘要:composer 安装 think-queue # tp5.0 composer require topthink/think-queue=1.1.6 --no-plugins # tp5.1.x composer require topthink/think-queue 2.0.4 --no-pl 阅读全文
posted @ 2023-11-23 10:59 鲨鱼大王 阅读(264) 评论(0) 推荐(0)
摘要:1.添加类库 omposer require phpoffice/phpword --ignore-platform-reqs 2.调用类库 $name = explode('.',$attachment->url); $t = $name[1]; $p = $name[0]; if($t=='do 阅读全文
posted @ 2023-07-03 15:39 鲨鱼大王 阅读(358) 评论(0) 推荐(0)
摘要:环境ThinkPHP+Redis 1.IP保存文件,文件名自定义,与后文对应 2.获取IP信息脚本.sh文件 #!/bin/bash #variables ip_txt_path=/www/wwwroot/checkip/china_ip.txt; ip_url='http://ftp.apnic. 阅读全文
posted @ 2023-03-17 23:05 鲨鱼大王 阅读(338) 评论(0) 推荐(0)
摘要:public function outputToExcelDemo(){ $header = []; $style = []; $info = []; //1.获取数据 $outface = new Outface(); $resIntaerfaceData = $outface->getAllDa 阅读全文
posted @ 2022-03-07 15:51 鲨鱼大王 阅读(657) 评论(0) 推荐(0)
摘要:->where(function ($query) { $param = $this->request->param(); $train_body_id = isset($param['train_body_id'])?$param['train_body_id']:0; $query->where 阅读全文
posted @ 2021-10-22 15:26 鲨鱼大王 阅读(143) 评论(0) 推荐(0)
摘要:修改reids配置文件打开订阅销毁事件 # 原配置: notify-keyspace-events "" # 更改为: notify-keyspace-events "Ex" 添加TP5.1 Redis订阅处理函数 <?php namespace app\common\command; use th 阅读全文
posted @ 2021-09-13 09:50 鲨鱼大王 阅读(248) 评论(0) 推荐(0)
摘要:public function doFreezeToPay($config, $order){ $sysconfig = Db::name("setting")->find(); vendor('alipays.AopSdk'); $aop = new \AopClient (); $aop->ap 阅读全文
posted @ 2020-05-12 18:05 鲨鱼大王 阅读(255) 评论(0) 推荐(0)
摘要:public function cancelFreeze($config, $order){ $sysconfig = Db::name("setting")->find(); vendor('alipays.AopSdk'); $aop = new \AopClient (); $aop->app 阅读全文
posted @ 2020-05-12 18:01 鲨鱼大王 阅读(269) 评论(0) 推荐(0)
摘要:public function doAlipayUnauth($config, $order){ $sysconfig = Db::name("setting")->find(); vendor('alipays.AopSdk'); $aop = new \AopClient (); $aop->a 阅读全文
posted @ 2020-05-12 17:59 鲨鱼大王 阅读(367) 评论(0) 推荐(0)
摘要:public function doAlipayAuth($user, $config, $order){ $sysconfig = Db::name("setting")->find(); vendor('alipays.AopSdk'); $aop = new \AopClient (); $a 阅读全文
posted @ 2020-05-12 17:52 鲨鱼大王 阅读(441) 评论(0) 推荐(0)