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.
我创建了一个简单的登录系统,到目前为止它可以工作,但我希望即使在浏览器关闭后也能记住会话。Zend 有这方面的东西吗?我似乎找不到它。最好的方法是什么?考虑到 XSS ;)
谢谢!
您可以使用 Zend_session 选项控制会话 cookie 的生命周期:
Zend_Session::setOptions(array('remember_me_seconds' => 864000))
这将使会话和登录信息持续 10 天。