Connecting to Redis To Go with PHP

前端 未结 3 539
没有蜡笔的小新
没有蜡笔的小新 2020-12-11 23:15

I am a newbie with Redis...I just recently picked up Redisent to work with Redis in PHP...and I am having tons of fun! However, I signed up for the Redis to go service, and

3条回答
  •  情歌与酒
    2020-12-11 23:44

    According to the documentation now, you can do this as part of the instantiation...

    $redis = new Predis\Client(array(
        'host'     => '10.0.0.1', 
        'password' => 'secret', 
        'database' => 10, 
    ));
    

    or

    $redis = new Predis\Client('redis://10.0.0.1/?password=secret&database=10');
    

提交回复
热议问题