ECmall錯誤:Call to a member function get_users_count() on a non-object in /home/dmg/wwwroot/includes/ecapp.base.php


運行控制器程序時出現 Fatal error:Call to a member function get_users_count() on a non-object in /home/dmg/wwwroot/includes/ecapp.base,不得其解,一步步往上找錯誤吧,發現這里有問題:
 1  /*
 2  *前台控制器基礎類
 3  */
 4  class FrontendApp  extends ECBaseApp
 5 {
 6      function __construct()
 7     {
 8          $this->FrontendApp();
 9     }
10      function FrontendApp()
11     {
12         Lang::load(lang_file('common'));
13         Lang::load(lang_file(APP));   //問題就出在這里了
14          parent::__construct();
15 
16          //  判斷商城是否關閉
17           if (!Conf::get('site_status'))
18         {
19              $this->show_warning(Conf::get('closed_reason'));
20              exit;
21         }
22 
23          $this->assign('copyright', Conf::get('copyright'));
24          $this->_statistic();
26      }
27      // 省略代碼
28  }

 看上面code內標紅的位置,調用控制器時會去load一個相應的lang文件,如果控制器為example.app.php,對應的需要在lang文件夾下添加同名的example.lang.php文件,這樣問題就解決了。


免責聲明!

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



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