永发信息网

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

答案:3  悬赏:80  手机版
解决时间 2021-11-19 17:58
  • 提问者网友:练爱
  • 2021-11-19 07:22
PHP怎么设置链接redis的超时时间
最佳答案
  • 五星知识达人网友:玩家
  • 2021-11-19 07:46
$this->redis->connect($host, $port,3); 3秒连接超时
$this->redis = new Redis();
$this->redis->connect($host, $port);
$this->redis->auth($auth);
这样解决就可以了,简单粗暴
全部回答
  • 1楼网友:一袍清酒付
  • 2021-11-19 10:30
php设置:$this->redis->connect($host, $port,3); 3秒连接超时
  • 2楼网友:佘樂
  • 2021-11-19 09:21
$this->redis->connect($host, $port,3); 3秒连接超时
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯