出于 Ajax 的原因,我需要将 Security.level 设置为中等。 但我希望如果用户关闭浏览器,他的 session 将被破坏。 我该怎么做?
提前致谢!
最佳答案
配置/核心.php
Configure::write('Session', array(
'defaults' => 'php',
'cookieTimeout' => 0, //Lives until the browser is closed.
'checkAgent' => false //To fix a little the Chrome Frame problem
));
关于session - 关闭浏览器时销毁 CakePHP session ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4044616/