Memcache::getServerStatus

(PECL memcache >= 2.1.0)

Memcache::getServerStatus锟斤拷锟节伙拷取一锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷/锟斤拷锟斤拷状态

说锟斤拷

Memcache::getServerStatus ( string $host [, int $port = 11211 ] ) : int

Memcache::getServerStatus()锟斤拷锟斤拷一锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷/锟斤拷锟斤拷状态锟斤拷锟斤拷也同锟斤拷锟斤拷锟斤拷使锟斤拷 锟斤拷锟斤拷memcache_get_server_status()锟斤拷

Note:

锟斤拷锟斤拷锟斤拷锟斤拷锟絤emcache2.1.0锟芥本锟斤拷锟诫。

锟斤拷锟斤拷

host

锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷址锟斤拷

port

锟斤拷锟斤拷锟斤拷锟斤拷锟剿口o拷默锟斤拷11211.

锟斤拷锟斤拷值

锟斤拷锟斤拷一锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷状态锟斤拷0锟斤拷示锟斤拷锟斤拷锟斤拷锟斤拷锟竭o拷锟斤拷0锟斤拷示锟斤拷锟竭★拷

锟斤拷锟斤拷

Example #1 Memcache::getServerStatus() 示锟斤拷

<?php

/* OO API */
$memcache = new Memcache;
$memcache->addServer('memcache_host'11211);
echo 
$memcache->getServerStatus('memcache_host'11211);

/* procedural API */
$memcache memcache_connect('memcache_host'11211);
echo 
memcache_get_server_status($memcache'memcache_host'11211);

?>

锟轿硷拷

  • Memcache::addServer() - 锟斤拷锟斤拷锟接筹拷锟斤拷锟斤拷锟揭伙拷锟絤emcache锟斤拷锟斤拷锟斤拷
  • Memcache::setServerParams() - 锟斤拷锟斤拷时锟睫改凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷状态