Bootstrap

[php] 代码片段之 Redis SessionHandler

class Redis_Session implements SessionHandlerInterface  
{
     
  
    private $handle;  
    private $lifetime;  
    private $prefix = 'TESTSID:';  
  
    /** 
     * open session 
     * @param string $save_path 
     * @param string $session_name 
     * @return bool 
     */  
    public function open($save_path, $session_name)  
    {
     
        $this->handle = new Redis();  
        $this->handle->connect('127.0.0.1', '6379'); 
        // redis 密码
        $this->handle-
;