connect($host, $port); if ($ret === false) { die($redis->getLastError()); } $ret = $redis->auth($user . "-" . $pwd . "-" . $dbname); if ($ret === false) { die($redis->getLastError()); } /*接下来就可以对该库进行操作了,具体操作方法请参考phpredis官方文档*/ $redis->flushdb(); $ret = $redis->set("key", "value"); if ($ret === false) { die($redis->getLastError()); } else { echo "OK".$redis->get("key"); } } catch (RedisException $e) { die("Uncaught exception " . $e->getMessage()); } ?>
已抢65721个
抢已抢31314个
抢已抢17281个
抢已抢8784个
抢已抢11346个
抢已抢23524个
抢