\Think\Session\DriverDb

数据库方式Session驱动 CREATE TABLE think_session ( session_id varchar(255) NOT NULL, session_expire int(11) NOT NULL, session_data blob, UNIQUE KEY `session_id` (`session_id`) );

Summary

Methods
Properties
Constants
open()
close()
read()
write()
destroy()
gc()
No public properties found
No constants found
No protected methods found
$lifeTime
$sessionTable
$hander
N/A
No private methods found
No private properties found
N/A

Properties

$lifeTime

$lifeTime : 

Session有效时间

Type

$sessionTable

$sessionTable : 

session保存的数据库名

Type

$hander

$hander : 

数据库句柄

Type

Methods

open()

open(string  $savePath, mixed  $sessName) 

打开Session

Parameters

string $savePath
mixed $sessName

close()

close() 

关闭Session

read()

read(string  $sessID) 

读取Session

Parameters

string $sessID

write()

write(string  $sessID, String  $sessData) 

写入Session

Parameters

string $sessID
String $sessData

destroy()

destroy(string  $sessID) 

删除Session

Parameters

string $sessID

gc()

gc(string  $sessMaxLifeTime) 

Session 垃圾回收

Parameters

string $sessMaxLifeTime