How to destroy session with browser closing in codeigniter

前端 未结 9 1206
陌清茗
陌清茗 2020-12-06 06:55

Recently I have developed a web application with codeigniter. I am facing a session related problem there badly.

Problem scenario:

If user

9条回答
  •  孤街浪徒
    2020-12-06 07:23

    Add a logout button.

    Have that button destroy the session with CI's built in destroy function.

    $this->session->sess_destroy();
    

提交回复
热议问题