-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_rediskey.php
32 lines (28 loc) · 1.1 KB
/
test_rediskey.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
require("class-excel-xml.inc.php");
include_once('./lib/cart.class.php') ;
include_once('./lib/redis.arr.class.php') ;
include "./lib/libchart/classes/libchart.php";
$conns = $this->actionConnectRedis() ;
$allResponse = array() ;
foreach($conns as $i => $conn){
$resList = $conn->get('redis_respondents_1_2898') ;
$resList = unserialize($resList) ;
//var_dump($resList) ;
if(!empty($resList)){
return $resList ;
}
}
function actionConnectRedis(){
$redis_slave_config = FLEA::getAppInf('computer') ;
$redis_slave_count = $redis_slave_config[slave_count] ;
$redisSlave = FLEA::getAppInf("redis_slave") ;
$conns=array();
foreach($redisSlave as $redis){
$redis_connect = new Redis() ;
$redis_connect->connect($redis["ip"],$redis["port"]);
$conns[]=$redis_connect;
}
return $conns ;
}
?>