在hmvc中如何从codeigniter中的另一个控制器加载控制器?

时间:2015-08-17 12:36:45

标签: codeigniter hmvc

codeigniter hmvc 中的控制器内调用控制器我调用我的控制器

$this->load->controller('controllername','',TRUE);

3 个答案:

答案 0 :(得分:0)

从另一个控制器调用控制器 请参阅Load Controller within Another Controller in Codeigniter您需要遵循本教程。

答案 1 :(得分:0)

将它放在帮助器上或创建另一个基类,其他两个类可以从中扩展。

答案 2 :(得分:0)

   $this->asign_any_variable= modules::load('module_name/controller_name/');

以下示例:

    $this->subscription = modules::load('subscription/subscription/');


    //set $return to FALSE. It will print the view
    $return = FALSE;
    $this->subscription->subscription_group($return);
相关问题