listSize() public method

获取队列中元素数
public listSize ( $list )
$list string 队列名
Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
 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);
 }