[英]Call a controller from another controller
我想打電話給另一個控制器,我有兩個
Ajax_controller
.
.
.
public function download_low_image($image){
$file = $this -> mimages -> get_image_file($image);
$test = new Thumb_controller();
$test->crop();
}
但是回報
Unable to locate the specified class: Session.php
如何解決呢?
可能這將有助於解決您的問題。 通常,您可以將其他控制器加載為
將控制器加載到控制器內部
$ this-> load-> library('../ controllers / Thumb_controller');
然后只需調用該方法
$ this-> Thumb_controller-> functioname();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.