本文整理匯總了PHP中Web::run方法的典型用法代碼示例。如果您正苦於以下問題:PHP Web::run方法的具體用法?PHP Web::run怎麽用?PHP Web::run使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Web
的用法示例。
在下文中一共展示了Web::run方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: implode
if ($package["QUOTA"] != $plan["limits"]["disk"]) {
$edits["quota"] = $plan["limits"]["disk"];
}
}
if (count($edits) > 0) {
$keys = array_keys($edits);
$edits["name"] = $plan["name"];
$edits["api.version"] = 1;
$result = $cpanel->editpkg($edits);
if ($result["metadata"]["result"] !== 1) {
$app->makeError($result);
continue;
}
$changes[] = $plan["name"] . " on " . $server["hostname"] . " updated: " . implode(",", $keys);
}
}
// Update WHMCS
$uPlanId = intval($plan["id"]);
$uDisk = intval($plan["limits"]["disk"]);
$uBw = intval($plan["limits"]["bandwidth"]);
$uDesc = mysql_real_escape_string($plan["description"]);
$uOverages = $plan["limits"]["overage"] == 1 ? "1,MB,MB" : "";
$update = mysql_query("UPDATE tblproducts SET configoption3 = '{$uDisk}', configoption5 = '{$uBw}', description = '{$uDesc}', overagesenabled = '{$uOverages}', overagesdisklimit = {$uDisk}, overagesbwlimit = {$uBw} WHERE id = {$uPlanId}");
if ($update === FALSE) {
$changes[] = "*** WARNING: Changes could not be synced to WHMCS - please resolve this manually! ***";
$changes[] = mysql_error();
}
echo json_encode($changes);
});
$app->run();