| about thinkphp usage in memcache, including memcache installation, how to run it in thinkphp, thinkphp In Memcache as an example of caching, a friend is required to refer to the below. !--ad-->!--ad--end-->
thinkphp memcache Cache usage
1, download and install Memcache 1), window to install the memcache. Download Memcached.exe to D:/memcached/memcached.exe. On the run cmd input: d:/memcached/memcached.exe-d install installation. 2), run d:/memcached/memcached.exe-d start memcache3), download Php_memcache.dll to the PHP installation directory extension directory PHP\EXT4), modify php.ini Join Extension=php_memcache.dll restart Apache. View phpinfo.php If you have a memcache module, the installation is successful
2, thinkphp memcache use 1), thinkphp/conf/convention.php Modify cache type ' data_cache_type ' = ' Memcache ',//data cache type,
Support: file| db| apc| memcache| shmop| sqlite| xcache| apachenote| EACCELERATOR2), thinkphp official download extension thinkphp_extend_3.1.2/extend/driver/cache/cachememcache.class.php saved to: Thinkphp/lib /driver/cache/cachememcache.class.php
3), test: S (' Test ', ' memcache '); $test = s (' Test '); Echo $test; The
Output memcache indicates that the test was successful. |