The content of this article is to share with you the configuration and instructions of php extending redis under windows. It has certain reference value. Friends in need can refer to it
#window The redis service must be installed and turned on.
If not, please click to view
We have to do four major steps in total
The first step
View your own phpconf().
Second step
Download igbinary This thing
There are two files in total
Click to download
Download the corresponding version
Then put the two red files in the compressed file into the php ext directory.
The third step
Download phpredis extension
Click to download
Download the corresponding version, x86 or x64
Similarly put the two files in the php ext directory
The third step
Add two lines to php.ini:
extension=php_igbinary.dll
extension=php_redis.dll
Check whether the redis extension is included in phpinfo
If it is extended, you can directly use it as a new object.
//实例化redis $redis = new Redis(); //连接 $redis->connect('127.0.0.1', 6379); //检测是否连接成功 echo "Server is running: " . $redis->ping(); // 输出结果 Server is running: +PONG
Window must install the Redis service and have already turned on.
If not, please click to view
We have to do four major steps in total
The first step
View your own phpconf().
Second step
Download igbinary This thing
There are two files in total
Click to download
Download the corresponding version
Then put the two red files in the compressed file into the php ext directory.
The third step
Download phpredis extension
Click to download
Download the corresponding version, x86 or x64
Similarly put the two files in the php ext directory
The third step
Add two lines to php.ini:
extension=php_igbinary.dll
extension=php_redis.dll
Check whether the redis extension is included in phpinfo
If it is extended, you can directly use it as a new object.
//实例化redis $redis = new Redis(); //连接 $redis->connect('127.0.0.1', 6379); //检测是否连接成功 echo "Server is running: " . $redis->ping(); // 输出结果 Server is running: +PONG
The above is the detailed content of PHP configuration and instructions for extending redis under windows. For more information, please follow other related articles on the PHP Chinese website!