關於TP5模板輸出時間戳問題--A non well formed numeric value encountered


  某日。因為一個項目。控制器我是這么寫的

 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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM