开发者

can i load a controller from a plugin in codeigniter?

Is it possible开发者_如何学Python in codeigniter to call/load a controller/view/model from a plugin/library? if possible then how?


Yes, it is possible to load view/model by calling refference to main CI object:

$CI =& get_instance();
$CI->load->model('sm_model');
$CI->sm_model->do_smth();
$CI->load->view('sm_view');

To call controller that way (and to be able to call one controller from another one) you'll need to install hmvc module

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜