Redis Learning (ii)

Source: Internet
Author: User
Tags php redis value store

By learning from Redis (i), it is now possible to apply the Redis, which is mainly about PHP redis!

The test is as follows:

First, install the Redis extension for PHP: Php_redis.dll (version: Php5.2_redis)

my: Http://pan.baidu.com/s/1gdzRTHh

Put the extracted files (php_redis.dll) in the PHP package directory!

such as: D:\AppServ\php5\ext


Then...

Opens the php.ini file, essentially in C:\Windows\php.ini

Extension=php_redis.dll (PS: The front does not add ";", will be commented out)

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/58/CB/wKioL1S87Hyy-aXaAAGqOolOheY716.jpg "title=" Fetion 20150119193246.png "alt=" Wkiol1s87hyy-axaaagqoolohey716.jpg "/>


Last reboot under apache!

See your phpinfo.php on the browser

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/58/CE/wKiom1S87C-D5ut5AABqdXkQYoU315.jpg "title=" Fetion 20150119193516.png "alt=" Wkiom1s87c-d5ut5aabqdxkqyou315.jpg "/>

So far, all of our configurations have been completed!

So happy!

PHP: Test Code

<?php$redis = new Redis (), $redis->connect ("127.0.0.1", 6379), $redis->set ("name", "Mao Ye Ye"), Echo $redis- >get ("name");

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/58/CB/wKioL1S87b_jtsoPAADOAXEpVP4800.jpg "title=" Fetion 20150119193815.png "alt=" Wkiol1s87b_jtsopaadoaxepvp4800.jpg "/>


Friendship Gift:

Redisis an open-source, high-performance key-Value Store (Key-value Store). It is often referred to as a data structure server (Data Structure Server). RedisThe key value can include a string (Strings) type, and it also includes a hash (Hashes), List (lists), collection (sets) and an ordered set (Sorted Sets) and other data types. For these data types, you can perform atomic operations. For example, attaching an operation to a string (Appendincrement the value in the hash, add the element to the list, calculate the intersection of the set, the set and the difference set, and so on.

in order to achieve excellent performance, Redis uses in-memory ( in-memory ) Data Set ( DataSet ) in a way. At the same time,Redis supports data persistence, you can dump the dataset to disk at intervals (snapshot), or append each action command at the end of the log ( Append only file,aof).

redis also supports master-slave replication ( master-slave replication  non-blocking. Synchronization redis There are some other features, These include simple things support, publish subscriptions (  pub/sub pipeline VM

Redis a rich client that supports most of the programming languages that are popular at this stage.

Redis Learning (ii)

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.