redis->connect($host, $port,3);$this->redis = new Redis();"; finally save the changes That’s it.">
php method to close redis: first open the corresponding file; then enter the statement "$this->redis->connect($host, $port,3);$this->redis = new Redis(); "; Finally save the changes.
php Close redis connection
Method:
$this->redis->connect($host, $port,3); //3秒连接超时 $this->redis = new Redis(); $this->redis->connect($host, $port); $this->redis->auth($auth); //这样解决就可以了,简单粗暴
Update For more related articles, please visitPHP中文网!
The above is the detailed content of How to close php redis. For more information, please follow other related articles on the PHP Chinese website!