PHP / CodeIgniter
From what I can see in the CI manual, to flush user data from the session, one creates an array with the values and calls $this->session->unset_userdata('$array')
Two questions actually:
{CLARIFICATION] Not wanting to terminate the session... just rather do some housekeeping.
Thanks.
You can delete the session...depending on what possibilities you want your user to have afterwords
http://ellislab.com/codeigniter/user-guide/libraries/sessions.html
Destroying a Session
To clear the current session:
$this->session->sess_destroy();
or by unsetting specific variables
This function can also be passed an associative array of items to unset.
$array_items = array('username' => '', 'email' => '');
$this->session->unset_userdata($array_items);
I do not see a point to do housekeeping but rather just to update the session when needed is all...
不确定这是否是您的意思,但是您可以尝试:
session_destroy();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.