ThinkPHP转载 | 关于TP5模板输出时间戳问题--A non well formed numeric value encountered某日。因为一个项目。控制器我是这么写的 /** * get admin/Picture/index * 显示所有图册信息 * @return view */ public function index() { $data = $this->model->getAllPicture(); // dump($data); $this->assign('data'作者王明昌发布时间2018-07-01 某日。因为一个项目。控制器我是这么写的 复制/** * get admin/Picture/index * 显示所有图册信息 * @return view */ public function index() { $data = $this->model->getAllPicture(); // dump($data); $this->assign('data',$data); return view(); } 模型我是这么写的 复制/** * 取得所有 */ public function getAllPicture(){ return Cache::tag('admin_cache_data')->remember('cache_picture',function(){ return Db('picture')->field('id,category_id,title,tags,download_count,picture_cover_url,preview_count,picture_details_id,status,update_time,sort')->select(); }); } 然后。报了这个错。 A non well formed numeric value encountered 我心里一万个草泥马。。。 后来。过程很艰辛。。。 只需在配置文件中加入 'datetime_format' => false,
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