0
這裏是modules
庫中的文件夾結構笨3 HMVC:無法加載會話庫
用戶 - > controllers-> Users.php
用戶 - > config-> autoload.php
welcome-> controllers->的welcome.php
autoload.php
$autoload = array(
'helper' => array('url', 'form'),
'libraries' => array('session')
);
的welcome.php(位於模塊/首頁/的welcome.php)
class Welcome extends MX_Controller {
public function index()
{
//load module
$this->load->module(array('users'));
}
}
我會收到以下錯誤:
Unable to locate the specified class: Session.php
注: url
和form
庫正確加載
它也產生同樣的錯誤消息 –
它應該工作:( 你試試這其中也
class Welcome extends CI_Controller { public function __construct() { parent::__construct(); $this->library->load('session'); } .......... }
–但加載另一個模塊,我需要在我的welcome.php文件擴展問題類MX_Controller看 –