Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/287.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php igniter数据表中的回调函数不工作_Php_Function_Codeigniter_Callback_Datatables - Fatal编程技术网

Php igniter数据表中的回调函数不工作

Php igniter数据表中的回调函数不工作,php,function,codeigniter,callback,datatables,Php,Function,Codeigniter,Callback,Datatables,我在代码中使用igniter datatables进行服务器端处理的datatables。我的代码如下: public function datatable() { $this->datatables->select(" insight_worksheet.id, insight_worksheet.workingDate,

我在代码中使用igniter datatables进行服务器端处理的datatables。我的代码如下:

public function datatable()
    {
        $this->datatables->select("
                            insight_worksheet.id,
                            insight_worksheet.workingDate,
                            insight_worksheet.reason,
                            ...                                
                            insight_worksheet.worksheet_status
                          ")
                  ->from("insight_worksheet")
                  ->edit_column('Actions', '$1', 'callback_test(insight_worksheet.id,insight_worksheet.worksheet_status)')
                  ...
                  ->join("insight_status","status.id=worksheet.status","left");

        echo $this->datatables->generate();

    }
   public function test($id,$worksheetStatus){
    return "srimanta";
}
操作的“我的视图”页面中,列直接字符串
回调\u测试(insight\u工作表.id,insight\u工作表.工作表\u状态)
显示的是实际工作,而对于其他列,显示的是精确数据。 目前,我在控制器类中放置了两个函数

你能告诉我代码中的问题吗


提前感谢。

尝试在帮助文件中添加回调函数测试

您的模型文件:

public function datatable()
    {
        $this->datatables->select("
                            insight_worksheet.id,
                            insight_worksheet.workingDate,
                            insight_worksheet.reason,
                            ...                                
                            insight_worksheet.worksheet_status
                          ")
                  ->from("insight_worksheet")
                  ->edit_column('Actions', '$1', 'test(insight_worksheet.id,insight_worksheet.worksheet_status)')
                  ...
                  ->join("insight_status","status.id=worksheet.status","left");

        echo $this->datatables->generate();

    }
您的帮助文件:

public function test($id,$worksheetStatus){
    return "srimanta";
}