listSize() 공개 메소드

获取队列中元素数
public listSize ( $list )
$list string 队列名
예제 #1
0
파일: socket.php 프로젝트: qieangel2013/zys
 public static function savefd($fd, $kname = 'fd')
 {
     $redis_con = new phpredis();
     if ($redis_con->listSize($kname)) {
         $redis_con->listPush($kname, $fd, 0, 1);
     } else {
         $redis_con->listPush($kname, $fd);
     }
 }
예제 #2
0
파일: socket.php 프로젝트: xingcuntian/yaf
 public static function savefd($fd)
 {
     //$where=array('id' =>37936);
     $redis_con = new phpredis();
     if ($redis_con->listSize('fd')) {
         $redis_con->listPush('fd', $fd, 0, 1);
     } else {
         $redis_con->listPush('fd', $fd);
     }
     //file_put_contents( __DIR__ .'/log.txt' , $fd);
 }