]>
*/
class phpredis extends Redis{
public function connect($config){
$host = $config['host'];
$port = $config['port'];
parent::connect($host,$port);
$pass = @$config['pass']?:false;
if($pass !== false){
parent::auth($pass);
}
return $this;
}
}
$config = array(
'host'=>'192.168.8.81',
'port'=>'6379',
'pass'=>'123456'
);
$redis = new phpredis();
$redis->connect($config);
$redis->set('name','dollarphp');
$ret = $redis->get('name');
var_dump($ret);
string(9) "dollarphp"
售后响应及时
7×24小时客服热线数据备份
更安全、更高效、更稳定价格公道精准
项目经理精准报价不弄虚作假合作无风险
重合同讲信誉,无效全额退款