listPush() 공개 메소드

入队列
public listPush ( $list, $value, $direction, $repeat )
$list string 队列名
$value mixed 入队元素值
$repeat int 判断value是否存在 0:不判断存在 1:判断存在 如果value存在则不入队列
예제 #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);
 }