2012-08-02 112 views
0

我有我的配置陣列,我得到它foreach。它工作正常,但我怎樣才能從任何模塊獲取參數。例如,我想要參數1自定義/自定義/索引。HMVC模塊陣列Codeigniter

謝謝你的答覆

$config['modules'] = array('calendar/calendar/index','randphoto/randphoto/index','feedback/feedback/index','survey/survey/index','custom/custom/index'); 

foreach ($this->config->item('modules') as $key) { 
     echo Modules::run($key); 
     } 

如果我獨自嘗試,它工作正常,但我想它在陣列回聲Modules::run('custom/custom/index', 1);

+0

使用$這個 - > URI->段(3);這會給你第三個來自url的參數。更多閱讀用戶指南 – 2012-08-02 15:03:07

回答