listGet() 공개 메소드

获取list队列的index位置的元素值
public listGet ( $list, $index, $end = null )
$list string 队列名
$index int 队列元素开始位置 默认0
$end int 队列元素结束位置 $index=0,$end=-1:返回队列所有元素
예제 #1
0
파일: socket.php 프로젝트: xingcuntian/yaf
 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);
 }
예제 #2
0
파일: socket.php 프로젝트: qieangel2013/zys
 public static function getfd($kname = 'fd')
 {
     $redis_con = new phpredis();
     $result = $redis_con->listGet($kname, 0, -1);
     echo json_encode($result);
 }