安装memecache wget http://memcached.org/latest tar -zxvf memcached-1.x.x.tar.gz cd memcached-1.x.x ./configure && make && make test && sudo make install # make test可以省略 报错处理:找不到libevent wget https://github.com/libevent/libevent/relea…
<?php $mem = new Memcache; $mem->connect('127.0.0.1', 11211) or die ("Could not connect"); $mem->set('key', 'This is a test!', 0, 60); $val = $mem->get('key'); echo $val; ?>…