$this->handler = new \Redis;

浏览:1642 发布日期:2016/05/16 分类:求助交流 关键字: redis->connect瞎调用 Redis
Redis.class.php 41行。


$redisMy = new \Redis();
var_dump($redisMy);//打印:object(Redis)#15 (0) { }
$redisMy->connect(C('REDIS_HOST'),C('REDIS_PORT'));//这里居然调用到了Cache.class.php的connect($type, $options)这个接口了。


Cache报错:
:(
无法加载缓存类型:localhost;class=Think\Cache\Driver\Localhost
错误位置
FILE: /opt/webpopled/Core/Library/Think/Cache.class.php  LINE: 44
TRACE
#0 /opt/webpopled/Core/Library/Think/Cache.class.php(44): E('\xE6\x97\xA0\xE6\xB3\x95\xE5\x8A\xA0\xE8\xBD\xBD\xE7\xBC\x93...')
#1 /opt/webpopled/Application/Webapp/Library/LibRedis.class.php(17): Think\Cache->connect('localhost', '6379')
#2 /opt/webpopled/Application/Webapp/Library/LibRedis.class.php(41): Webapp\Library\LibRedis::init()
#3 /opt/webpopled/Application/Webapp/Library/ScreenApi.class.php(326): Webapp\Library\LibRedis::publish('screen_pub_chan...', '{"pkts_program"...')
#4 /opt/webpopled/Application/Webapp/Controller/ProgramController.class.php(219): Webapp\Library\ScreenApi->sendInstructions(Array)
#5 [internal function]: Webapp\Controller\ProgramController->doSend()
#6 /opt/webpopled/Core/Library/Think/App.class.php(164): ReflectionMethod->invoke(object(Webapp\Controller\ProgramController))
#7 /opt/webpopled/Core/Library/Think/App.class.php(202): Think\App::exec()
#8 /opt/webpopled/Core/Library/Think/Think.class.php(120): Think\App::run()
#9 /opt/webpopled/Core/ThinkPHP.php(97): Think\Think::start()
#10 /opt/webpopled/index.php(34): require('/opt/webpopled/...')
#11 {main}

求解,求解!!!
最佳答案
评论( 相关
后面还有条评论,点击查看>>