Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用以下方法在临时会话中存储了几个值:$job = new Zend_Session_Namespace('application');
$job = new Zend_Session_Namespace('application');
我将如何只销毁会话应用程序而不清除所有会话。
要从会话中删除值,请在对象属性上使用 PHP 的 unset() 函数。假设 $job 有一个属性“用户名”,如下所示:
$job = new Zend_Session_Namespace('application'); $job->username = 'test';
要从会话中删除用户名,只需执行以下操作:
unset($job->username);
要删除整个“应用程序”命名空间和相关数据,您可以使用:
Zend_Session::namespaceUnset('application');