<?php
function memcache_con($key){
$hosts=array(
'192.168.118.120',
'192.168.118.121',
'192.168.118.122',
);
// 16进制转10 取余 ,根据缓存服务器数量 count
$index=hexdec(substr(md5($key),0,5)%3);
$host=$index[$index];
return memcache_connect($host,11711);
请您注册登录超级码客,加载全部码客文章内容... |