public function open($savePath, $sessName)
{
// 检测php环境
if (!extension_loaded('redis')) {
throw new Exception('not support:redis');
}
$this->handler = new \Redis();
// 建立连接
$func = $this->config['persistent'] ? 'pconnect' : 'connect';
$this->handler->{$func}($this->config['host'], $this->config['port'], $this->config['timeout']);
if ('' != $this->config['password']) {
$this->handler->auth($this->config['password']);
}
if (0 != $this->config['select']) {
$this->handler->select($this->config['select']);
}
return true;
}