首页 > 其他 > 详细

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

时间:2017-07-28 00:01:24      阅读:4000      评论:0      收藏:0      [点我收藏+]

  某日。因为一个项目。控制器我是这么写的

 1 /**
 2    * get admin/Picture/index
 3    * 显示所有图册信息
 4    * @return view
 5    */
 6     public function index()
 7     {
 8         $data = $this->model->getAllPicture();
 9        
10         // dump($data);
11         $this->assign(‘data‘,$data);
12         return view();
13     }

模型我是这么写的

1 /**
2   *  取得所有
3   */
4   public function getAllPicture(){
5       return Cache::tag(‘admin_cache_data‘)->remember(‘cache_picture‘,function(){
6             return Db(‘picture‘)->field(‘id,category_id,title,tags,download_count,picture_cover_url,preview_count,picture_details_id,status,update_time,sort‘)->select();
7       });
8   }

然后。报了这个错。

    A non well formed numeric value encountered

我心里一万个草泥马。。。

 

后来。过程很艰辛。。。

 

技术分享啥都别说了。在config.php加上这句。搞定。

 

参考:http://www.thinkphp.cn/topic/45698.html

 

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

原文:http://www.cnblogs.com/chenrunxuan/p/7247941.html

(2)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!