This article mainly introduces how to install the php_memcache module in windows. it is very detailed and simple. it is recommended for reference by other users.
Required knowledge
Familiar with basic programming environment setup.
Running environment
Windows 7 (64-bit );
Php-5.3;
Memcached-1.2.6
Environment download
What is the PHP Memcache module?
The Memcache module provides convenient process-oriented and object-oriented interfaces for memcached. memcached is a resident process cache product generated to reduce the workload of dynamic web applications loading data from databases.
Download the official memcache website PHP Memcache
A 64-bit memcache for php5.3 http://www.jb51.net/softs/205839.html is attached.
In this case, my personal profile is correct. my next is 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
Decompress the downloaded 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;?>
Test in the browser. Note that the memcache service must be started. For how to install memcache on windows, refer to an article I wrote earlier.
Install and configure Memcached in Windows
If the above article or link is helpful to you, don't forget to click "pretty good" at the end of the article or click "like" in the lower right corner of the page. You can also click the "share" floating button on the right side of the page to let more people read this article.
Due to my limited level, if there is anything wrong with the expression and code in the article, please criticize and correct me. Leave your footprints. comments are welcome.