コード例 #1
0
ファイル: server.php プロジェクト: buraka1/mlazarov-rockmongo
 /** server infomation **/
 public function doIndex()
 {
     $db = $this->_mongo->selectDB("admin");
     //command line
     $query = $db->command(array("getCmdLineOpts" => 1));
     if (isset($query["argv"])) {
         $this->commandLine = implode(" ", $query["argv"]);
     } else {
         $this->commandLine = "";
     }
     //web server
     $this->webServers = array();
     if (isset($_SERVER["SERVER_SOFTWARE"])) {
         list($webServer) = explode(" ", $_SERVER["SERVER_SOFTWARE"]);
         $this->webServers["Web server"] = $webServer;
     }
     $this->webServers["<a href=\"http://www.php.net\" target=\"_blank\">PHP version</a>"] = "PHP " . PHP_VERSION;
     $this->webServers["<a href=\"http://www.php.net/mongo\" target=\"_blank\">PHP extension</a>"] = "<a href=\"http://pecl.php.net/package/mongo\" target=\"_blank\">mongo</a>/" . RMongo::getVersion();
     $this->directives = ini_get_all("mongo");
     //build info
     $ret = $db->command(array("buildinfo" => 1));
     $this->buildInfos = array();
     if ($ret["ok"]) {
         unset($ret["ok"]);
         $this->buildInfos = $ret;
     }
     //connection
     $this->connections = array("Host" => $this->_server->mongoHost(), "Port" => $this->_server->mongoPort(), "Username" => "******", "Password" => "******");
     $this->display();
 }