从另一个控制器调用控制器 [英] Call a controller from another controller

查看:181
本文介绍了从另一个控制器调用控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要呼叫另一个控制器,我有这两个

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();

}

但返回

Unable to locate the specified class: Session.php

如何解决这个问题?

推荐答案

可能会有助于解决您的问题。
通常,您可以加载其他控制器为

may be this will help to solve your problem. generallly , you can load other controller as


  1. 在控制器中加载控制器像

  1. Load Controller inside your controller like

$ this-> load-> library('../ controllers / Thumb_controller');

$this->load->library('../controllers/Thumb_controller');

$ this-> Thumb_controller-> functioname();

$this->Thumb_controller->functioname();

这篇关于从另一个控制器调用控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆