繁体   English   中英

HMVC模块阵列Codeigniter

[英]HMVC Modules array Codeigniter

我在我的配置中有数组,我把它带到了foreach。 可以,但是如何从任何模块中获取参数。 例如,我希望参数1为custom / custom / index。

感谢您的回复

$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);
      }

如果我单独尝试,它可以正常工作,但我希望在数组echo Modules::run('custom/custom/index', 1);

使用$this->uri->segment(3); 这将为您提供来自URL的第三个参数。 有关更多信息,请阅读用户指南。

http://ellislab.com/codeigniter/user-guide/libraries/uri.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM