Zend Namespace - Check if Session Exists

后端 未结 2 886
执念已碎
执念已碎 2021-01-15 16:00

All,

I am using Zend Framework and Zend_Session to do global session management for my application. I plan to clear all sessions on logout and hence am using the fol

相关标签:
2条回答
  • 2021-01-15 16:15

    This seems to do the trick..

    if($this->isStarted())
    {
        if($this->sessionExists())
        {
            $this->namespaceUnset("default");
            $this->forgetMe();
        }
    }
    
    0 讨论(0)
  • 2021-01-15 16:30

    Not really answers your question about the error, but is beneficial for the question:

    $nsName = 'MyNamespace';
    if (Zend_Session::namespaceIsset($nsName)) {
      echo $nsName.' exists';
    }
    
    0 讨论(0)
提交回复
热议问题