Memcache::getServerStatusとは? わかりやすく解説

Weblio 辞書 > コンピュータ > PHP関数リファレンス > Memcache::getServerStatusの意味・解説 

Memcache::getServerStatus

(No version information available, might be only in CVS)
Memcache::getServerStatus — サーバの状態を返す

説明

int Memcache::getServerStatus ( string host [, int port] )
Memcache::getServerStatus() は、サーバがオンライン/オフラインのどちらであるかを返します。 memcache_get_server_status() 関数を使用することも可能です。
注意: この関数は、Memcache バージョン 2.1.0 で追加されました。

パラメータ

host
memcached が接続を待ち受けるホストを指定します。
port
memcached が接続を待ち受けるポートを指定します。 このパラメータはオプションで、デフォルト値は 11211 です。

返り値

サーバの状態を返します。サーバに接続できなかった場合に 0、 それ以外の場合にはゼロ以外の値を返します。

例 1215. Memcache::getServerStatus() の例
<?php

/* オブジェクト指向の API */
$memcache = new Memcache;
$memcache->addServer('memcache_host', 11211);
echo $memcache->getServerStatus('memcache_host', 11211);

/* 手続き型の API */
$memcache = memcache_connect('memcache_host', 11211);
echo memcache_get_server_status($memcache, 'memcache_host', 11211);

?>


参考

Memcache::addServer()
Memcache::setServerParams()




英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「Memcache::getServerStatus」の関連用語

Memcache::getServerStatusのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Memcache::getServerStatusのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
PHP Documentation GroupPHP Documentation Group
Copyright © 1997 - 2025 by the PHP Documentation Group.

©2025 GRAS Group, Inc.RSS