Home > Backend Development > PHP Problem > How to close php redis

How to close php redis

藏色散人
Release: 2023-03-02 08:14:02
Original
3880 people have browsed 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.

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); 
//这样解决就可以了,简单粗暴
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template