Redis Configuration pee in PHP

Source: Internet
Author: User

Php5.4+redis3.0+widows system has been introduced to the specific configuration

Redis official Http://www.redis.io/download

1. The latest version of Redis needs to run in PHP5.4 and above, and PHP versions below 5.4 may not support

2.PHPVersion query PHP extension mode, is NTS or TS, download the corresponding Redis extension library, expand the library https://github.com/phpredis/phpredis/downloads

4. Add the corresponding extension library to the Extension folder (EXT) in PHP

5.php configuration file php.ini, new configuration

Extension=php_igbinary.dll
Extension=php_redis.dll

6. Restart the Apache service, open the home page to see if the Redis extension has been configured successfully

7. Start your Redis Journey

1 $redis=NewRedis ();2 //Print_r ($redis);3 $redis->connect (' localhost ', 6379);4 $redis->select (0);5 //echo $redis->get (' test12345 ');6 $redis->set (' key ', ' This is a test ');7 Echo' Redis-cli connected <br/> ';8 Echo $redis->get (' key ');9 Echo' ;Ten $redis->close ();

Redis Configuration pee in PHP

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.