复制代码 代码如下:
<?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');
?>
时间: 2024-10-27 06:33:47