代码如下:
PHP
require_once("Zend/Loader.PHP");
Zend_Loader::loadClass("Zend_Session_Namespace");
$Session = new Zend_Session_Namespace('Db');
$Session ->host = '127.0.0.1';
$Session ->username = 'root';
$Session ->password = '111';
$Session ->dbname = 'test';
//定义会话过期时间
$Session ->setExpirationSeconds(300);
//定义会话步骤次数
$Session ->setExpirationHops(2,'host');
$Session ->setExpirationHops(3,'username');
$Session ->setExpirationHops(4,'password');
$Session ->setExpirationHops(5,'dbname');
?>
原文链接:https://www.f2er.com/php/24948.htmlrequire_once("Zend/Loader.PHP");
Zend_Loader::loadClass("Zend_Session_Namespace");
$Session = new Zend_Session_Namespace('Db');
$Session ->host = '127.0.0.1';
$Session ->username = 'root';
$Session ->password = '111';
$Session ->dbname = 'test';
//定义会话过期时间
$Session ->setExpirationSeconds(300);
//定义会话步骤次数
$Session ->setExpirationHops(2,'host');
$Session ->setExpirationHops(3,'username');
$Session ->setExpirationHops(4,'password');
$Session ->setExpirationHops(5,'dbname');
?>