ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:session:reference:lifetime

ADOdb_Session::lifetime

Syntax
int ADOdb_Session::lifetime(
  optional int $lifeTime
  )

Description

The static method lifeTime sets or gets the maximum lifetime of the session connection in seconds. Setting the value overrides the default, which is determined by the value of the session.gc_maxlifetime in the php.ini file

The value must be set before config() is called

Use As A Getter

When used without parameters it returns the currently set value

Usage

 
include_once 'adodb/adodb.inc.php';
include_once "adodb/session/adodb-session2.php";
 
/*
* Sets the session lifetime to 10 minutes
*/
ADOdb_Session::lifetime(600);
ADOdb_Session::config($driver,$host,$user,$pass,$database);
v5/session/reference/lifetime.txt · Last modified: 2018/07/01 22:02 by peterdd