Home >Backend Development >PHP Tutorial >Example of using the session cycle and number limit of zf framework_PHP tutorial

Example of using the session cycle and number limit of zf framework_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:36:001158browse

Copy code The code is as follows:

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';
//Define session expiration time
$Session - >setExpirationSeconds(300);
//Define the number of session steps
$Session ->setExpirationHops(2, 'host');
$Session ->setExpirationHops(3, 'username');
$Session ->setExpirationHops(4 , 'password');
$Session ->setExpirationHops(5 , 'dbname');
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/741263.htmlTechArticleCopy the code as follows: ?php require_once("Zend/Loader.php"); Zend_Loader::loadClass(" Zend_Session_Namespace"); $Session = new Zend_Session_Namespace('Db'); $Session -host = '12...
Statement:
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