随笔分类 -  thinkphp

摘要:1. 验证码接口 $captcha = captcha(); $data['data'] = [ 'img' => "data:image/png;base64," . base64_encode($captcha->getData()), 'key' => uniqid() ]; $data['s 阅读全文
posted @ 2024-05-21 13:30 _迷途 阅读(255) 评论(0) 推荐(0) 编辑
摘要:以下是我在项目中常用的.gitignore文件: # 目录 /.idea/ /.vscode/ /vendor/ /runtime/ /thinkphp/ /public/uploads/ /public/upload/ /__MACOSX/ public/.well-known/ # 文件 Thu 阅读全文
posted @ 2024-01-03 15:27 _迷途 阅读(250) 评论(0) 推荐(0) 编辑
摘要:我发现修改.env文件里的APP_TRACE=false仍然无法关闭页面右下角的调试图标 1.创建一个类app/common/libs/NullTrace.php <?php namespace app\common\libs; use think\App; use think\Response; 阅读全文
posted @ 2023-03-17 10:50 _迷途 阅读(312) 评论(0) 推荐(0) 编辑
摘要:php think build --module test 新建一个test应用 阅读全文
posted @ 2023-03-01 13:52 _迷途 阅读(20) 评论(0) 推荐(0) 编辑
摘要:/** * 通过数据库的方式递归查询当前分类ID的所有子分类ID * @param $id * @return array * @throws DataNotFoundException * @throws DbException * @throws ModelNotFoundException * 阅读全文
posted @ 2022-12-23 23:26 _迷途 阅读(133) 评论(0) 推荐(0) 编辑
摘要:/** * 通过数据库递归的方式查找当前分类ID的所有上级ID * @throws ModelNotFoundException * @throws DbException * @throws DataNotFoundException */ public function findAllParen 阅读全文
posted @ 2022-12-23 23:13 _迷途 阅读(108) 评论(0) 推荐(0) 编辑
摘要:thinkphp/library/think/route/Rule.php 第794行,增加这段代码: elseif (is_array($route) && count($route) == 2) { $result = $this->dispatchMethod($request, $route 阅读全文
posted @ 2022-12-22 10:39 _迷途 阅读(57) 评论(0) 推荐(0) 编辑
摘要:首先: composer require topthink/think-captcha v3.0.8 把这张图片下载,后缀名png改成zip,解压到: vendor/topthink 阅读全文
posted @ 2022-12-13 14:55 _迷途 阅读(57) 评论(0) 推荐(0) 编辑
摘要:composer require topthink/think-filesystem 阅读全文
posted @ 2022-12-13 11:02 _迷途 阅读(551) 评论(0) 推荐(0) 编辑
摘要:首先开启多应用的方法: composer require topthink/think-multi-app 定义路由: <?php use think\facade\Route; Route::any('/user/login', '\\app\\index\\controller\\User@lo 阅读全文
posted @ 2022-12-03 22:20 _迷途 阅读(434) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示