Requirements Required Knowledge
Familiar with the BASIC programming environment setup.
Operating Environment
Windows 7 (64-bit);
php-5.3;
memcached-1.2.6
Download Address
Environment download
What is PHP memcache module
The Memcache module provides a convenient process-oriented and object-oriented interface for memcached, memcached a resident process caching product that results from loading data from a database for dynamic Web applications.
Download Memcache website PHP memcache Download Address
Also attached are 64-bit memcache for php5.3 download address http://www.jb51.net/softs/205839.html
Here you need to pay attention to the version number, according to personal circumstances, I am under the Php_memcache-3.0.8-5.3-ts-vc9-x86.zip
Use the Phpinfo () function to view information about the current PHP version
Install extension
Unzip the downloaded compression pack and copy the Php_memcache.dll module to the Ext folder in PHP.
modifying php.ini files
Introduce the following code
Test
Restart the Web server.
Enter the following code in the memcache.php file:
<?php
$memcache = new Memcache;
$memcache->connect (' 127.0.0.1 ', 11211);
$memcache->set (' key ', ' Hello memcache! ');
$out = $memcache->get (' key ');
echo $out;
? >
In the browser to test, here is the need to note that the Memcache service must be in the boot state Oh. For the installation of the Memcache service on the Windows platform, you can refer to an article I wrote before.
Install configuration Memcached in Win system
If the above article or link to you, do not forget to click on the end of the article "still good" button or to the lower right corner of the page click "Praise a" button oh. You can also click on the right side of the page to "share" the hover button Oh, let more people read this article.
Because of my limited level, the article in terms of presentation and code, if there are irregularities, welcome criticism. Leave your footprints, welcome to comment Oh.