如何杀死cakephp中的会话?
我正在开发登录模块。在注销模块中,m 销毁会话。 注销后,如果我单击后退按钮,我将获取用户信息。 请帮我修复这个错误。
谢谢
m working on loginmodule. In logout module, m destroying the session.
After logging out, If i click back button m getting the user information.
Please, help me to fix this bug.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
$this->Auth->logout();
$this->Session->destroy();
这不是为你做的吗?
$this->Auth->logout();
$this->Session->destroy();
Is that not doing it for you?
原因是您的浏览器已缓存该页面,因此单击“返回”将始终显示用户信息。对此你无能为力。
这可能会有所帮助 http://cakephp.1045679.n5.nabble.com/After-logout-browser-back-button-shows-all-visited-page-td1321477.html
The reason being is that your browser has cached the page, so clicking back would always show the user information. There is not much you can do about this.
this might help http://cakephp.1045679.n5.nabble.com/After-logout-browser-back-button-shows-all-visited-page-td1321477.html
你好,
如果 session->destroy 不起作用,请尝试使用 Session->del('session name');以及所有会话 NMA
HI,
If session->destroy does not work the try with Session->del('session name'); and for all session nma
最好使用“$this->Session->delete('SessioName') 删除会话;
Its better to delete session using the "$this->Session->delete('SessioName');