本文整理汇总了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();