首页 > TAG信息列表 > testKey

PHP代码连接Redis,含Redis密码验证、指定某一Redis数据库

<?php $redis = new Redis(); $redis->connect('127.0.0.1', 6379); //连接Redis $redis->auth('mypasswords123sdfeak'); //密码验证 $redis->select(2);//选择数据库2 $redis->set( "testKey" , "Hello Redis"); /