How to destroy Zend_Session_Namespace without session_destroy

穿精又带淫゛_ 提交于 2019-12-03 10:55:23

To remove a value from a session, use PHP's unset() function on the object property. Let's say $job has a property 'username' like so :

$job = new Zend_Session_Namespace('application');
$job->username = 'test';

To remove username from the session just do :

unset($job->username);

To remove the whole 'application' namespace and asociated data you can use :

Zend_Session::namespaceUnset('application');
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!