限时免费试用:欢迎注册 api.bigmodel.org ,快速体验大模型 API 接入服务。
当前位置:首页 >开发者 >网站框架 >后端框架 >ThinkPHP

转载 | 关于TP5模板输出时间戳问题--A non well formed numeric value encountered

分类:ThinkPHP时间:2018-07-01浏览:3825
某日。因为一个项目。控制器我是这么写的
/**
   * 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,
本站文章如未注明出处均为原创,转载请注明出处,如有侵权请邮件联系站长。
0/500
Share your thoughts respectfully.