免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3416 | 回复: 1

ECmall错误:Call to a member function get_users_count() on a non-object in /home/ [复制链接]

论坛徽章:
0
发表于 2012-01-12 20:47 |显示全部楼层
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. 1 /*
  2. 2 *前台控制器基础类
  3. 3 */
  4. 4 class FrontendApp extends ECBaseApp
  5. 5 {
  6. 6     function __construct()
  7. 7     {
  8. 8         $this->FrontendApp();
  9. 9     }
  10. 10     function FrontendApp()
  11. 11     {
  12. 12         Lang::load(lang_file('common'));
  13. 13         Lang::load(lang_file(APP));  //问题就出在这里了
  14. 14         parent::__construct();
  15. 15
  16. 16         // 判断商城是否关闭
  17. 17         if (!Conf::get('site_status'))
  18. 18         {
  19. 19             $this->show_warning(Conf::get('closed_reason'));
  20. 20             exit;
  21. 21         }
  22. 22
  23. 23         $this->assign('copyright', Conf::get('copyright'));
  24. 24         $this->_statistic();
  25. 26     }
  26. 27     //省略代码
  27. 28 }
  28. 复制代码
复制代码
看上面code内标红的位置,调用控制器时会去load一个相应的lang文件,如果控制器为example.app.php,对应的需要在lang文件夹下添加同名的example.lang.php文件,这样问题就解决了。

论坛徽章:
0
发表于 2012-01-12 20:48 |显示全部楼层
谢谢分享
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP