Unable to load libraries when using CI 3 with HMVC

烂漫一生 提交于 2020-02-02 06:25:46

问题


I started a Modular project in CI2 (using HMVC). I am moving the project to CI 3.

I am trying to autoload the session library using config/autoload .php

$autoload['libraries'] = array('database','session');

I get this error:

Fatal error: Call to undefined method MY_Loader::_ci_load_class() in /srv/www/htdocs/projects/application/third_party/MX/Loader.php on line 158

Even if a manually load the library within the controller using $this->load->library('session'), i get the same error.

I am convinced this is an error caused by using HMVC. I have managed to make CI 3 modular but I am stuck with this issue, please help...

I can load helpers & models but I cant load libraries :(


回答1:


I think you have wrong version of HMVC you need to download the latest version https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/downloads

Click on branches and you will see 2 versions.



来源:https://stackoverflow.com/questions/28927450/unable-to-load-libraries-when-using-ci-3-with-hmvc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!