[英]Calling index function of a controller in another function
我在創建調用函數(索引函數)的函數時遇到問題。 為了便於理解,讓我解釋一下:
class My_Controller extends CI_Controller{
public function index(){
echo 'This is index function';
}
public function calling_index(){
// doing what's inside the index() function
}
}
有什么建議嗎?
使用不會有問題
$this->index()
因為控制器只是一類
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.