listGet() public method

获取list队列的index位置的元素值
public listGet ( $list, $index, $end = null )
$list string 队列名
$index int 队列元素开始位置 默认0
$end int 队列元素结束位置 $index=0,$end=-1:返回队列所有元素
Esempio n. 1
0
 public static function getfd()
 {
     $redis_con = new phpredis();
     $result = $redis_con->listGet('fd', 0, -1);
     //$m = file_get_contents( __DIR__ .'/log.txt');
     //echo $m;
     echo json_encode($result);
 }
Esempio n. 2
0
 public static function getfd($kname = 'fd')
 {
     $redis_con = new phpredis();
     $result = $redis_con->listGet($kname, 0, -1);
     echo json_encode($result);
 }