之前使用phalcon+memcached,memcached的类是自己写的类加载进来,目前使用正常。但是想尝试下使用redis,但是连接却提示 redis server went away 。phalcon无法连接到服务器的redis,想看看各位能不能有一个提示或者代码的例子可以参考。
我是这样写的
Redis.php
class Redis {
protected $redis = null;
public function __construct(){
$this->redis = $this->_initMemcache();
}
protected function _initMemcache(){
$redis = new redis();
$redis->connect("ip地址","63796");
return $redis;
}
}
隔江千里
慕的地6264312
慕尼黑8549860
www说
慕盖茨4494581