[英]Call a controller from another controller
I want to call another controller, I have these two 我想打电话给另一个控制器,我有两个
Ajax_controller Ajax_controller
.
.
.
public function download_low_image($image){
$file = $this -> mimages -> get_image_file($image);
$test = new Thumb_controller();
$test->crop();
}
But returns 但是回报
Unable to locate the specified class: Session.php
How can fix this? 如何解决呢?
may be this will help to solve your problem. 可能这将有助于解决您的问题。 generallly , you can load other controller as
通常,您可以将其他控制器加载为
Load Controller inside your controller like 将控制器加载到控制器内部
$this->load->library('../controllers/Thumb_controller'); $ this-> load-> library('../ controllers / Thumb_controller');
then simply call the method 然后只需调用该方法
$this->Thumb_controller->functioname(); $ this-> Thumb_controller-> functioname();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.