使用Memcache时,我们可以用memcache提供的get方法,通过键查询到当前的数据,但是有时候需要查询内存中所有的键和值,这个时候可以使用下面的代码实现: <?php /** * Created by PhpStorm. * User: Steven * Date: 2016/9/22 * Time: 17:21 */ $host = '127.0.0.1'; $port = 11211; $mem = new Memcache(); $mem->connect($host, $por…