How to install redis+ connection PHP in Windows system

Source: Internet
Author: User
Tags download redis php redis redis install redis redis server
1 Download Redis windows32 bit client: Http://pan.baidu.com/s/1ntK6AyH
After downloading the proposed extract to the Web directory, such as: C:appservredis

2 in the Command Line window enter: Redis-server.exe redis.conf

If you see the following interface, it means the Redis server started successfully


3 Download the Reids extension of PHP for easy operation in PHP redis

Download Address: Http://pan.baidu.com/s/1c0u04Go (for php5.2 version)
after the download completes, unzip the Php_redis.dll to the directory

where C:appservphp5ext is located, and then modify the php.ini profile

Plus the following sentence Extension=php_redis.dll

To restart the Apache server, this redis installed

in PHP to test the following
  code is as follows
<?php
$redis =new redis ();
$ Redis->connect (' 127.0.0.1 ', ' 6379 ');

$redis->set (' City ', ' Beijing ');
Echo $redis->get (' city ');



Output: Beijing
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.