hellokitty111
5/7/2015 - 10:27 AM

php redis example

php redis example

<?php
$redis = new Redis();
$redis->connect('127.0.0.1');
$n = $redis->lSize('subject:name');

for($i=0;$i<$n;$i++){
    $val=$redis->lGet('subject:name',$i);
    echo $val;
}
?>