Browse Source

redis配置

lizhen_gitee 1 year ago
parent
commit
73234a0776
1 changed files with 2 additions and 2 deletions
  1. 2 2
      application/common.php

+ 2 - 2
application/common.php

@@ -16,10 +16,10 @@ function newredis(){
     $redisconfig = config("redis");
     $redis->connect($redisconfig["host"], $redisconfig["port"]);
     if ($redisconfig['redis_pwd']) {
-        $redis->auth(config('redis_pwd'));
+        $redis->auth($redisconfig['redis_pwd']);
     }
     if($redisconfig['redis_selectdb'] > 0){
-        $redis->select(config('redis_selectdb'));
+        $redis->select($redisconfig['redis_selectdb']);
     }
     return $redis;
 }