// print_r(get_loaded_extensions());exit;
// 链接Memcached服务器
$mem = new Memcached();
$status = $mem->addServer("127.0.0.1",11211);
// 保存数据
$mem->set("name","djkk",999);
$mem->set("name2","djkk22",999);
// echo "已经保存name<br>";
// 读取数据
$name = $mem->get("name");
$name2 = $mem->get("name2");
// 替换数据
$mem->replace("name","Dj NiuMan Remix!",999);
// 删除数据
$mem->delete("name");
// 清空所有数据
$mem->flush();
echo "已经读取name:{$name}<br>";
echo "已经读取name2:{$name2}<br>";
//关闭连接
$mem->close();
// 链接Memcached服务器
$mem = new Memcached();
$status = $mem->addServer("127.0.0.1",11211);
// 保存数据
$mem->set("name","djkk",999);
$mem->set("name2","djkk22",999);
// echo "已经保存name<br>";
// 读取数据
$name = $mem->get("name");
$name2 = $mem->get("name2");
// 替换数据
$mem->replace("name","Dj NiuMan Remix!",999);
// 删除数据
$mem->delete("name");
// 清空所有数据
$mem->flush();
echo "已经读取name:{$name}<br>";
echo "已经读取name2:{$name2}<br>";
//关闭连接
$mem->close();