2015-10-16 65 views
1

我收到以下錯誤無法找到指定的類:session.php文件

「無法找到指定的類:session.php文件」

我笨3 HMVC(作品罰款直到我試圖做modules::run())。

這是我的歡迎控制器:

class Welcome extends MY_Controller 
{ 
    protected $data; 

    function __construct() 
    { 
     parent::__construct(); 
     $this->load->model('welcome_model', 'model'); 
    } 

    public function index() 
    { 
     modules::run('blog/cacat'); 

     $this->data['client_ip'] = $this->clientIP(); 
     $this->twig->display('welcome_message', $this->data); 
    } 
} 

回答

0

你有下面的代碼編輯third_party/MX/Modules.php

-應該刪除並且+應該被添加。

-  log_message('error', "Module controller failed to run: {$module}/{$method}"); 
+ 
+  $error_message = "Module controller failed to run: {$module}/{$method}"; 
+ 
+  if (defined('ENVIRONMENT') && ENVIRONMENT == 'development') { 
+   return ($error_message); 
+  } else { 
+   log_message('error', $error_message); 
+  } 
    } 

以及調用方法應該是

modules::run('Module/Controller/Method'); 
+0

仍然沒有工作:( –

相關問題