class Session

Session保存位置处理类。封装了Session入库/Cache的逻辑处理 采用Mysql存储时需要建数据表,语句如下: CREATE TABLE cml_session ( id char(32) NOT NULL, value varchar(5000) NOT NULL, ctime int(11) unsigned NOT NULL, PRIMARY KEY(id) )ENGINE=MEMORY DEFAULT CHARSET=utf8;

Methods

static 
init()

初始化

bool
open( string $savePath, string $sessionName)

session open

bool
close()

session close

array|null
read( string $sessionId)

session读取

bool
write( string $sessionId, string $value)

session 写入

bool
destroy( string $sessionId)

session 销毁

bool
gc( int $lifeTime)

session gc回收

Details

at line line 41
static init()

初始化

at line line 71
bool open( string $savePath, string $sessionName)

session open

Parameters

string $savePath
string $sessionName

Return Value

bool

at line line 81
bool close()

session close

Return Value

bool

at line line 98
array|null read( string $sessionId)

session读取

Parameters

string $sessionId

Return Value

array|null

at line line 118
bool write( string $sessionId, string $value)

session 写入

Parameters

string $sessionId
string $value

Return Value

bool

at line line 139
bool destroy( string $sessionId)

session 销毁

Parameters

string $sessionId

Return Value

bool

at line line 156
bool gc( int $lifeTime)

session gc回收

Parameters

int $lifeTime

Return Value

bool