redis->connect($host, $port,3);$this->redis = new Redis();"; finally save the changes That’s it."/> redis->connect($host, $port,3);$this->redis = new Redis();"; finally save the changes That’s it.">

Home  >  Article  >  Backend Development  >  How to close php redis

How to close php redis

藏色散人
藏色散人Original
2020-07-09 12:22:503835browse

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.

How to close php redis

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 visit PHP中文网!

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn