提交 41427cd2 authored 作者: chengye's avatar chengye

test redis host use config

上级 df9e9aa1
...@@ -297,10 +297,12 @@ class loginClassModel extends Model ...@@ -297,10 +297,12 @@ class loginClassModel extends Model
$cookieSid = $this->rock->cookie('PHPSESSID'); $cookieSid = $this->rock->cookie('PHPSESSID');
//删除redis //删除redis
$redis = new Redis(); $redis = new Redis();
$host = getconfig("redis_host"); $host = getconfig("redis_host");
$port = getconfig("redis_port"); $port = getconfig("redis_port");
$redis->connect($host,$port); $redis->connect($host,$port);
$sid = 'PHPREDIS_SESSION:'.$cookieSid; $sid = 'PHPREDIS_SESSION:'.$cookieSid;
$redis->delete($sid); $redis->delete($sid);
$redis->close(); $redis->close();
...@@ -416,4 +418,4 @@ class loginClassModel extends Model ...@@ -416,4 +418,4 @@ class loginClassModel extends Model
$strs="QWERTYUIOPASDFGHJKLZXCVBNM1234567890qwertyuiopasdfghjklzxcvbnm"; $strs="QWERTYUIOPASDFGHJKLZXCVBNM1234567890qwertyuiopasdfghjklzxcvbnm";
return substr(str_shuffle($strs),mt_rand(0,strlen($strs)-11),$length); return substr(str_shuffle($strs),mt_rand(0,strlen($strs)-11),$length);
} }
} }
\ No newline at end of file
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论