Home > Article > Backend Development > PHP configuration memcache caching method_PHP tutorial
The article briefly introduces the method of configuring memcache cache in PHP and detecting whether the configuration is successful. Beginners can refer to it.
1. Download memcache and put it under your own drive letter. For example: d:memcached
2. Start->cmd-> Enter the command d:memcachedmemcached.exe -d install to install
3. After the installation is complete, enter d:memcachedmemcached.exe -d start
4. Download php_memcache.dll, and pay attention to placing your php version file under ext/ under your php
5. Add a line extension=php_memcache.dll to php.ini
6. Restart apache and check if there is memcache in your phpinfo. If there is, it means the installation is successful
7. Test code
The code is as follows
|
Copy code
|
||||
$mem = new Memcache; If "test memcache successfull" is output, the installation is successful. |
http: //www.bkjia.com/PHPjc/444735.html