<?php
$host='Localhost';
$port=11211;
$mem=new Memcache();
$mem->connect($host,$port);
$items=$mem->getExtendedStats (‘items’);
$items=$items[$host,$port]['items'];
foreach($items as $key=>$values){
$number='uid_'.$key;
$str=$mem->getExtendedStats ("cachedump",$number,10);
$line=$str["$host:$port"];
if( is_array($line) && count($line)>0){
foreach($line as $key=>$value){
$mem->get($key);
}
}
}
?>
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |