These two days in the study tp the memcached cache always encounters pits
I found a lot of tutorials on the Internet.
Install memcached First
Download Memcache Compression Pack
Use cmd to install with administrator command
e:\wamp\bin\memcached>memcached.exe-d Install installation command
e:\wamp\bin\memcached>memcached.exe-d Start Open memcached
Then put the Php_memcache.dll in the attachment under the Ext Extension folder under PHP
Then go to modify php.ini file add a sentence Extension=php_memcache.dll
After the addition, restart Apache
Then output phpinfo () on the PHP page;
Check that the memcache is loaded successfully.
If the load is successful, you can do the memcache test on a php page.
- <?php
- Phpinfo ();
- $memcache = new Memcache;
- $memcache->connect ('127.0.0.1 ', 11211) or Die (' shit ');
- $memcache->set (' key ',' Hello memcache! ');
- $out = $memcache->get (' key ');
- echo $out;
WAMP Environment Installation Memcache extension