Zend framework ZF3在某些非活动会话后注销
如何在某些非活动会话后自动注销会话?我想在zend framework 3中使用此功能。如果有人有想法,请让我通知。目前我的应用程序使用zend skeleton在5分钟内注销。但我希望会话过期时间至少为30分钟Zend framework ZF3在某些非活动会话后注销,zend-framework,zend-framework2,zend-framework3,zend-session,Zend Framework,Zend Framework2,Zend Framework3,Zend Session,如何在某些非活动会话后自动注销会话?我想在zend framework 3中使用此功能。如果有人有想法,请让我通知。目前我的应用程序使用zend skeleton在5分钟内注销。但我希望会话过期时间至少为30分钟 请提供上述解决方案。只需在module.config.php中添加此会话配置,并确保Zend\session已添加到config/modules.config.php use Zend\Session\Storage\SessionArrayStorage; return [
请提供上述解决方案。只需在
module.config.php
中添加此会话配置,并确保Zend\session
已添加到config/modules.config.php
use Zend\Session\Storage\SessionArrayStorage;
return [
// your existing config
'session_config' => [
'cookie_lifetime' => 60 * 30
],
'session_storage' => [
'type' => SessionArrayStorage::class
],
];
只需将此会话配置添加到
module.config.php
中,并确保Zend\session
已添加到config/modules.config.php
use Zend\Session\Storage\SessionArrayStorage;
return [
// your existing config
'session_config' => [
'cookie_lifetime' => 60 * 30
],
'session_storage' => [
'type' => SessionArrayStorage::class
],
];
谢谢多莉·阿斯温。但使用上述解决方案,我已经尝试过了。请参考多莉·阿斯温。但使用上述解决方案,我已经尝试过了。请参考您使用的服务器操作系统?Ubuntu14.04,LAMP您使用的服务器操作系统?Ubuntu14.04,LAMP