Unable to load libraries when using CI 3 with HMVC

2019-05-17 18:11发布

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条回答
Bombasti
2楼-- · 2019-05-17 18:32

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.

查看更多
登录 后发表回答