Install phpredis in windows, windowsphpredis
Redis:
Redis is a key-value storage system. Similar to Memcached, Memcached supports more storage value types, including string, list, set, and zset) and hash (hash type ). These data types support push/pop, add/remove, Intersection Set and difference set, and more abundant operations, and these operations are atomic. On this basis, redis supports sorting in different ways. Like memcached, data is cached in the memory to ensure efficiency. The difference is that redis periodically writes the updated data to the disk or writes the modification operation to the append record file, and on this basis implements master-slave (master-slave) synchronization.
1. Download:
Php_redis.dll: Example
Click (here) to fold or open
- <? Php
- Phpinfo ();
- ?>
3. The installation module places the php_redis.dll module in the php installation directory/ext/in php. ini. extension = php_bz2.dll is added before extension = php_redis.dll4. After testing and restarting apache, access redis. php.
Click (here) to fold or open
- <? Php
- Phpinfo ();
- $ Redis = new Redis ();
- $ Redis-> connect ("192.168.60.6", "6379 ");
- $ Redis-> set ("test", "Hello World ");
- Echo $ redis-> get ("test ");
- ?>
Test Results