How to stop execute other controller after response to ajax codeigniter

前端 未结 1 616
谎友^
谎友^ 2021-01-27 06:18

I want to know how to stop execute function and other controller that involved after we response output json data.

In my case here,

  1. I just call test
相关标签:
1条回答
  • 2021-01-27 07:11

    HI if every time you want to do the same thing as you said you can do that :

    Library :

    if($this->input->is_ajax_request())
    {
        $redirect_link = array("ajax_redirect_link" => TRUE);
        header('Content-Type: application/x-json; charset=utf-8');
        echo(json_encode($redirect_link));
        exit;
    }
    
    0 讨论(0)
提交回复
热议问题