Logout codeigniter

后端 未结 5 1156
情话喂你
情话喂你 2021-01-05 19:22

I have a logout controller in codeigniter :

session->sess_de         


        
5条回答
  •  死守一世寂寞
    2021-01-05 20:07

    first we have to load session library to deal with session than unset the sessionID and destroy the session. I am using this code to unset my session and secure logout.

    $this->load->library('session');
    $this->session->set_userdata('user_id', FALSE);
    $this->session->sess_destroy();
    $this->load->view('your URL');
    

提交回复
热议问题