提交 a6334760 authored 作者: wangkr's avatar wangkr

更新 SingleSign.php

上级 69c4ddb8
...@@ -16,11 +16,11 @@ class SingleSign { ...@@ -16,11 +16,11 @@ class SingleSign {
public $instence = null; public $instence = null;
public function __construct($ip='192.168.1.70',$port=6379){ public function __construct(){
if($this->instence === null){ if($this->instence === null){
$redis = new \Redis();
$res = $redis->connect($ip,$port);
$redis = new \Redis();
$res = $redis->connect(config('admin.redis_host'),config('admin.redis_port'));
if($res) $this->instence = $redis; if($res) $this->instence = $redis;
else throw new Exception("redis connect faild"); else throw new Exception("redis connect faild");
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论