Home > Article > Backend Development > wampserver25, installation of memcache under php5512 wampserver yellow wampserver2.4 wampserver2.
1. Download memcached and install it
2. Install the php extension of memcached
Place the downloaded php_memcache.dll in the ext folder in the php installation directory;
Add extension= in php.ini php_memcache.dll
3. Restart apache and check in phpinfo()
The installation is now complete. If the memcached installation is successful and the dll is added, and php.ini is also changed, but it is still not loaded, it may be that the dll version does not correspond.
The following is the package I tested: http://download.csdn.net/detail/u010533511/9499362
Example:----------------* ******************------------------
$memc =new Memcache();
$memc->connect('127.0.0.1',11211);
$memc->set('username','Color the sky',0,60);
$username= $memc->get('username');
echo "------".$username."******";
$userinfo=array('name'=>'123 wooden man ','sex'=>'Male','age'=>'23');
$memc->set('userinfo',$userinfo);
$userinfo_obj=$memc->get( 'userinfo');
var_dump($userinfo_obj);
//Replace the value corresponding to key
$memc->replace('username','clear conscience',0,60);
//Delete the data corresponding to key
$memc->delete('username');
//Delete all data
$memc->flush();
//Close the link
$memc->close();
?>
The above introduces the installation of memcache under wampserver25 and php5512, including the content of wampserver and memcache. I hope it will be helpful to friends who are interested in PHP tutorials.