jianti 发表于 2015-8-30 10:10:20

ECmall错误:Call to a member function get_users_count() on a non-object in /home/dm

运行控制器程序时出现 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文件,这样问题就解决了。
页: [1]
查看完整版本: ECmall错误:Call to a member function get_users_count() on a non-object in /home/dm