本文整理汇总了PHP中Server::getFromDB方法的典型用法代码示例。如果您正苦于以下问题:PHP Server::getFromDB方法的具体用法?PHP Server::getFromDB怎么用?PHP Server::getFromDB使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server
的用法示例。
在下文中一共展示了Server::getFromDB方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: moduleRelPath
$waypointsWebPath = $moduleRelPath . "/" . $waypointsRelPath;
$server->deleteAllSyncedFlights();
} else {
if ($action == 7) {
// guess identical pilots
$moduleRelPath = moduleRelPath(0);
$waypointsWebPath = $moduleRelPath . "/" . $waypointsRelPath;
$server->guessPilots();
} else {
if ($action == 8) {
// delete pilots -> only use if you know what you are doing , must be sed only after delete flights
$server->deleteAllSyncedPilots();
} else {
if ($action == 9) {
// move sync pointer back (in effect will reprocess last n log entries next time
$server->getFromDB();
echo "Sync Pointer was " . $server->lastPullUpdateID . "<BR>";
$server->moveSyncPointer($_GET['moveCounterBack'] + 0);
echo "Sync Pointer is " . $server->lastPullUpdateID . "<BR>";
} else {
if ($action == 99) {
//test
echo $server->data['url_op'];
echo "<BR>{$action}<br>";
$pilotsList = $server->getPilots(3);
print_r($pilotsList);
//list($nearestWaypoint,$minTakeoffDistance)=$server->findTakeoff(49.4619,-8.67848);
//echo "wpt: ".$nearestWaypoint->intName. "~ $minTakeoffDistance<BR>";
}
}
}
示例2: registerServerToMaster
function registerServerToMaster()
{
global $CONF_master_server_id;
require_once dirname(__FILE__) . "/lib/xml_rpc/IXR_Library.inc.php";
$masterServer = new Server($CONF_master_server_id);
$masterServer->getFromDB();
$masterServerURL = "http://" . $masterServer->data['url_op'];
$thisServerURL = "http://" . $this->data['url_op'];
$client = new IXR_Client($masterServerURL);
if ($this->DEBUG) {
$client->debug = true;
}
if (!$client->query('server.registerSlave', $this->data['site_pass'], $lat, $lon)) {
echo 'registerSlave: Error ' . $client->getErrorCode() . " -> " . $client->getErrorMessage();
return 0;
// $client->getErrorCode();
} else {
$newServerID = $client->getResponse();
return $newServerID;
}
}