摘要: $arr = [ 'id' => 10, 'name' => '标题' ]; $this->assign('a', $arr); $t = time(); $this->assign('t', $t); $isok = 'ture'; $this->assign('isok', $isok); re 阅读全文
posted @ 2020-09-17 15:28 梦魇之瞳 阅读(167) 评论(0) 推荐(0)
摘要: // 查询语法 // db('admin')->where('id', 10)->select(); // db('admin')->where('id', '>=', 10)->select(); // 模糊查询 // db('admin')->where('id', 'like', '%1%') 阅读全文
posted @ 2020-09-17 15:25 梦魇之瞳 阅读(164) 评论(0) 推荐(0)
摘要: public function index() { // 查询 全部数据 // $list = db('admin')->select(); // 查询一维数组 // $list1 = db('admin')->where('id',2)->find(); // 增加 // $data = [ // 阅读全文
posted @ 2020-09-17 15:23 梦魇之瞳 阅读(121) 评论(0) 推荐(0)
摘要: <?php namespace app\admin\controller; use think\Controller; use think\DB; class Index extends Controller { // public function _initialize() // { // if 阅读全文
posted @ 2020-09-17 15:22 梦魇之瞳 阅读(210) 评论(0) 推荐(0)