3', PHPWEB:'php.cn', settings:'settings', FullScreen:'Full Screen', Speed:'Speed', BrainwashingLoop:'Loop', speedNormal:'Normal', click_to_see:'Click to see full code for direct edit', nextSection:'Next Section', Cancel:'Cancel', Confirm:'Confirm', all_lang_string:'zh|en|zh-tw|ja|ko|ms|fr|de', Next:'Next', Previous:'Previous', };
Home > php教程 > php手册 > zf框架的session会话周期及次数限制使用示例

zf框架的session会话周期及次数限制使用示例

WBOY
Release: 2016-06-13 09:40:52
Original
1087 people have browsed it

复制代码 代码如下:


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');
?>

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template