ThinkPHPtp3.2以数组的形式存入session正确做法 $home = array( 'id'=>$res['id'], 'name'=>$res['name'], 'type'=>$res['type']); session('home',$home);//id 错误做法 $name=$res['name']; session('home["name"]',$name);作者王明昌发布时间2018-01-28文章目录正确做法错误做法正确做法复制$home = array( 'id'=>$res['id'], 'name'=>$res['name'], 'type'=>$res['type']); session('home',$home);//id错误做法复制$name=$res['name']; session('home["name"]',$name);
2018-02-27tp5controller与model使用数据库控制器里使用数据库 use think\Db; $info = Db::table('fly_user')->select();//用些前缀,全部查询 $info = Db::table('fly_u
2018-04-30TP5错误 | A non well formed numeric value encountered数据表字段是create_time timestamp 默认:CURRENT_TIMESTAMP 使用时间会出现以下错误: A non well formed numeric value encoun
2018-02-02tp3.2-if三层嵌套问题if标签 value1 value2 value3 if标签不支持三层嵌套,所以第三层不要用if标签,用eq标签;就能解决三层嵌套。 相等不相等 还有更多比较标签可以使用 http://documen
2018-07-04转载 | ThinkPHP5+Layui实现图片上传加预览 图片 上传图片 layui.use('upload',function(){ var upload = layui.upload, jq = layui.jquery; upload.render