From 7c7e7f4a07636e2c1dfa5becf441e84811d482c5 Mon Sep 17 00:00:00 2001 From: Tinywan <756684177@qq.com> Date: Sat, 29 Oct 2016 16:19:18 +0800 Subject: [PATCH] =?UTF-8?q?Redis=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=E7=9A=84=E5=AE=9E=E4=BE=8B=EF=BC=8CMaster=E5=AE=9E=E4=BE=8B?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E5=A4=9A=E4=B8=AASlave=E5=AE=9E=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/misc.xml | 1 + Backend/Home/Controller/DataBaseController.class.php | 10 +++------- ThinkPHP/Library/Org/Util/RedisInstance.class.php | 2 -- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index c9a8380..b0f8c53 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -16,4 +16,5 @@ + \ No newline at end of file diff --git a/Backend/Home/Controller/DataBaseController.class.php b/Backend/Home/Controller/DataBaseController.class.php index 3ca863c..b169d64 100644 --- a/Backend/Home/Controller/DataBaseController.class.php +++ b/Backend/Home/Controller/DataBaseController.class.php @@ -8,15 +8,11 @@ class DataBaseController extends Controller { public function index(){ - //根据当前控制器名来判断要执行那个城市的操作 - $cityName = CONTROLLER_NAME; - $this->show($cityName); + } - //注意 city方法 本身是 protected 方法 + public function show($name){ - //和$name这个城市相关的处理 - $this->name = $name; - $this->display('Index/show'); + } /** diff --git a/ThinkPHP/Library/Org/Util/RedisInstance.class.php b/ThinkPHP/Library/Org/Util/RedisInstance.class.php index c7ab374..9445be4 100644 --- a/ThinkPHP/Library/Org/Util/RedisInstance.class.php +++ b/ThinkPHP/Library/Org/Util/RedisInstance.class.php @@ -43,8 +43,6 @@ public static function getInstance() { if (!(static::$_instance instanceof \Redis)) { static::$_instance = new \Redis(); - self::getInstance()->connect('121.41.88.209', '63789'); - self::getInstance()->auth('tinywanredis'); } return static::$_instance; }