PHP怎么设置链接redis的超时时间

如题所述

$this->redis->connect($host, $port,3); 3秒连接超时
$this->redis = new Redis();
$this->redis->connect($host, $port);
$this->redis->auth($auth);
这样解决就可以了,简单粗暴
温馨提示:答案为网友推荐,仅供参考
第1个回答  2016-08-05
$this->redis->connect($host, $port,3); 3秒连接超时
第2个回答  2016-08-05
php设置:$this->redis->connect($host, $port,3); 3秒连接超时
相似回答