随笔分类 -  Thinkphp

摘要:public function findLastClass($id) { $classInfo = Db::name('class')->where('id', $id)->find(); if ($classInfo && $classInfo['islast'] == 1) { // 如果当前记 阅读全文
posted @ 2024-05-11 19:10 85541585 阅读(32) 评论(0) 推荐(0) 编辑
摘要:thinkphp 数据嵌套输出 $list=Db::name('a')->field('id,xxx,...')->group('rwid')->select(); $data['list']=[]; foreach ( $list as $v){ $part=Db::name('a')->fiel 阅读全文
posted @ 2023-03-05 00:28 85541585 阅读(48) 评论(0) 推荐(0) 编辑
摘要:$group=Db::name('auth_group')->select();foreach ($group as $v){ $v['auth_group_access']=Db::name('auth_group_access')->where('group_id',$v['id'])->sel 阅读全文
posted @ 2021-08-08 08:33 85541585 阅读(51) 评论(0) 推荐(0) 编辑
摘要:// 方法1:insertGetId方法,新增数据并返回主键值使用getLastInsID Db::name('user')->insert($data); $userId = Db::name('user')->getLastInsID(); // 方法2:使用insertGetId方法 Db:: 阅读全文
posted @ 2021-06-29 23:32 85541585 阅读(3262) 评论(0) 推荐(0) 编辑
摘要:function() use() { } $newdate=date('Y-m-d H:i:s',strtotime("-$v1[1] day")); $data['list']=Db::name('apply') ->where('sbid', 'IN', function ($query) us 阅读全文
posted @ 2021-03-09 22:49 85541585 阅读(595) 评论(0) 推荐(0) 编辑
摘要:跳转传参sessionreturn redirect('/aa')->with('auth',$login);跳转带参数一定要加exit();redirect('/aa/aa?list=5')->send(); exit(); 阅读全文
posted @ 2021-01-23 22:10 85541585 阅读(679) 评论(0) 推荐(0) 编辑
摘要:<?phpnamespace app\admin\controller;use think\Controller;use think\Db;//IDdefined('AppId') or define('AppId', '用户ID');//keydefined('AppKey') or define 阅读全文
posted @ 2020-11-22 18:59 85541585 阅读(357) 评论(0) 推荐(0) 编辑
摘要:jwt、tp中间件听起来好高大上的样子。 花了两天时间阅读文档和看视频,终于懂了点皮毛,在这里记录一下。 以下两个问题需要搞懂 1 jwt 是什么 ? JWT 全称 Json Web token,是为了在网络应用环境间传递声明而执行的一种基于json的开放标准(RFC 7519),该token被设计 阅读全文
posted @ 2020-09-23 23:42 85541585 阅读(3096) 评论(0) 推荐(0) 编辑
摘要:<?phpnamespace app\admin\controller;use think\Controller;class Test extends controller{ const name='PHP软件开发工程师'; private $a='1'; public function index 阅读全文
posted @ 2020-02-05 12:55 85541585 阅读(379) 评论(0) 推荐(0) 编辑
摘要:获取数组需要加 /a input('pname/a') 阅读全文
posted @ 2019-01-08 11:04 85541585 阅读(87) 评论(0) 推荐(0) 编辑

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