Logout codeigniter

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

I have a logout controller in codeigniter :

session->sess_de         


        
5条回答
  •  被撕碎了的回忆
    2021-01-05 20:07

    My problem had to do with caching on the server side. The quickest I could fix it was by appending random text to the logout link:

    load->helper('string');
        echo anchor('/home/logout/'.random_string(), 'logout');
    ?>
    

    home/logout contained the same code as function index in the question.

    Just so you know the redirect('/', 'refresh') did not work for me, but I again I did a quick test.

    I am guessing that the random_string() method can be replaced by outputting headers that force cache to be cleared etc. As you have probably guessed, I can't do that right now as I am super busy. Maybe later.

提交回复
热议问题