This article provides a detailed analysis of how to configure memcache for php in windows. For more information, see
This article provides a detailed analysis of how to configure memcache for php in windows. For more information, see
First, install the php and apache environments.
I used a wamp integrated suite.
Php 5.2.8
Apache 2.2.1.1
After these are all ready,
Go to the memcache official website to download the memcache.exe program in windows.
Then put it in the c: \ memcache directory.
Open the cmd command and enter
Cd c: \ memcache
Install
Memcache.exe-p install
After installation is complete
Memcache.exe-p start
After memcache is enabled successfully
Put php_memcache.dll in the php/ext directory.
Add a piece of content to the php. ini file in the php Directory.
Extension = php_memcache.dll
After the installation, the U.S. server and Hong Kong server will restart apache.
Then output phpinfo () on the php page ();
Check whether memcache is successfully loaded.
If it is loaded successfully, the US space can be tested on a php page.
// Phpinfo ();
$ Memcache = new Memcache;
$ Memcache-> connect ('127. 0.0.1 ', 127) or die ('shit ');
$ Memcache-> set ('key', 'Hello memcache! ');
$ Out = $ memcache-> get ('key ');
Echo $ out;
If it succeeds, it will output
Hello memcache!