PHP Open Redis Extension

Source: Internet
Author: User

1. Installing Redis

Githttps://github.com/msopentech/redis/releases

2. Test Redis

Windows run (shortcut key: Windows key +r), enter "cmd" command, enter the DOC operating system window;

Accessing the Redis installation directory using commands

2.1 Turn on the Redis daemon (enter the Redis installation directory)

Redis-server.exe redis-windows-conf

2.2 Entering the Redis client (enter the Redis installation directory)

3. Installing the Redis Extension for PHP

Https://pecl.php.net/package/redis
Select the appropriate Redis extension package based on the phpinfo () information

4. Place the Php_redis.dll and php_redis.pdb two files of the Redis expansion pack in the Ext folder
5. Modify the php.ini file

Extension=php_redis.dll

6. Verify that the Redis extension is turned on
View Phpinfo () information, search for Redis

7.php Connect and test the Redis database (remember to turn on Redis service)
New test.php

<?  $redisnew$redis->connect (' 127.0.0.1 ', 6379);   $redis->set (' name ', ' KLC 'echo$redis->get (' name ');? >

Access test.php, output KLC, test pass

PS: Redis service must be turned on using Redis

PHP Open Redis Extension

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.