Requirements
What is a PHP memcache module
The Memcache module provides a convenient process-oriented and object-oriented interface for memcached, Memcached is a resident process cache product that is created to reduce the load of data from a database by Dynamic Web applications.
Download
- Memcache official website
- PHP Memcache
We need to pay attention to the version number, according to personal circumstances, I was php_memcache-3.0.8-5.3-ts-vc9-x86.zip
Use the Phpinfo () function to view information about the current PHP version
Install extensions
Unzip the downloaded compressed package and copy the Php_memcache.dll module to the PHP ext folder.
Modify the php.ini file
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 ;? >
To test in a browser, it is important to note that the Memcache service must be in the boot state. For the installation of the Memcache service in the Windows platform, you can refer to an article I wrote earlier.
If the above articles or links are helpful to you, don't forget to click the "OK" button at the end of the article or click the "like a " button in the bottom right corner of the page. You can also click on the right side of the page " share " hover button Oh, let more people read this article.
Author: Li-cheng Weibo: http://weibo.com/licheng0426 Source: http://www.cnblogs.com/Li-Cheng/p/4392461.htmldue to my limited level, the article in terms of presentation and code if there is something wrong, welcome criticism. Leave your footprints, welcome to comment Oh. You can also pay attention to me, study together Oh! (^_^) If you think this article is helpful to you, let's enjoy a coffee bar, what's The DA (^_^)
Windows Platform Installation Php_memcache module