예제 #1
0
파일: User.php 프로젝트: hildalove/tiny
 /**
  * test RdisPOOL
  */
 public function redis()
 {
     $configs = ['redis0' => ['host' => '192.168.10.10', 'port' => 6379]];
     RedisPool::addServer($configs);
     $redis = RedisPool::getRedis('redis0');
     //$redis->set('name', 'hanfeng');
     echo $redis->get('name');
 }
예제 #2
0
파일: PHPMQ.php 프로젝트: hildalove/tiny
 protected function init()
 {
     $config = ['redis0' => ['host' => '192.168.10.10', 'port' => 6379]];
     RedisPool::addServer($config);
     $this->redis = RedisPool::getRedis('redis0');
 }