|
@@ -58,5 +58,22 @@ class Test extends Controller
|
|
|
return $sig;
|
|
|
}
|
|
|
|
|
|
+ public function test_redis(){
|
|
|
+ $redis = new Redis();
|
|
|
+ $redisconfig = config("redis");
|
|
|
+ $redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth($redisconfig['redis_pwd']);
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select($redisconfig['redis_selectdb']);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ $party_id = 141;
|
|
|
+ $res = $redis->hGetAll("online_".$party_id);
|
|
|
+ dump($res);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|