ThinkPHP5


think\session\driver\Redis
library\think\session\driver\Redis.php at line 17

Class Redis

SessionHandler
└─Redis

public class Redis
extends SessionHandler


Constructor Summary
void

__construct(mixed config)

Method Summary
bool

open(string savePath, mixed sessName)

打开Session

void

close()

关闭Session

bool|string

read(string sessID)

读取Session

bool

write(string sessID, String sessData)

写入Session

bool|void

destroy(string sessID)

删除Session

bool

gc(string sessMaxLifeTime)

Session 垃圾回收

Constructor Detail

library\think\session\driver\Redis.php at line 23

__construct

public void __construct(mixed config)

Method Detail

library\think\session\driver\Redis.php at line 36

open

public bool open(string savePath, mixed sessName)

打开Session

Throws:
Exception

library\think\session\driver\Redis.php at line 63

close

public void close()

关闭Session


library\think\session\driver\Redis.php at line 77

read

public bool|string read(string sessID)

读取Session


library\think\session\driver\Redis.php at line 89

write

public bool write(string sessID, String sessData)

写入Session


library\think\session\driver\Redis.php at line 104

destroy

public bool|void destroy(string sessID)

删除Session


library\think\session\driver\Redis.php at line 115

gc

public bool gc(string sessMaxLifeTime)

Session 垃圾回收


ThinkPHP5