一、入队
<?php
header("Content-type:text/html;charset=utf-8");$redis = new Redis();
$redis->connect('127.0.0.1',6369);
$password = '123456';
$redis->auth($password);
$arr = array('1','2','3','4','5','6','7','8','9','10');
foreach($arr as $k=>$v){
$redis->lpush("mylist",$v);
}
二、出队
<?php
header("Content-type:text/html;charset=utf-8");
$redis = new Redis();
$redis->connect('127.0.0.1',6369);
$password = '123456';
$redis->auth($password);
//list类型出队操作
$value = $redis->rpop('mylist');
if($value){
echo "出队的值".$value;
}else{
echo "出队完成";
}
?>