当前位置: 首页>>代码示例>>PHP>>正文


PHP Web::get方法代码示例

本文整理汇总了PHP中Web::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Web::get方法的具体用法?PHP Web::get怎么用?PHP Web::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Web的用法示例。


在下文中一共展示了Web::get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: updateUpdate

 function updateUpdate($param)
 {
     // This is sort of a hack... The ssl configuration of the ipaddress has to be reflected properly in the domain too. So the web objects are initialized, the ssl parameters are changed on the fly and synced again. All this is because, apache will refuse to start if the ssl files are missing, which is fucking terrible. (later)... Apache is actually ok. The whole damn problem is with iis. Be careful about the createExtraVariables. As for now, the web object doesn't create objects from the parent domain object, and thus web object will work indepnednely without the help of the domain parent object. Thus the parent of the web can anything. But if in the at any time in the future the web object starts needing any parameter from the domain, then this will have to be rewritten. Then the domain objects have to initialized first, then the web objects are initialized, and the web can be created only UNDER the domain, and not directly under this object.
     global $gbl, $sgbl, $login, $ghtml;
     $driverapp = $gbl->getSyncClass($this->__masterserver, $this->__readserver, 'web');
     $olddom = $this->domain;
     $newdom = $param['domain'];
     if (!csb($newdom, "lxdummy") && !is_disabled($newdom)) {
         $ip = gethostbyname($newdom);
         if ($ip != $this->getParentO()->ipaddr) {
             throw new lxexception("this_domain_does_not_resolve_to_this_ip", 'domain', $newdom);
         }
     }
     $this->domain = $param['domain'];
     $this->ipaddr = $this->getParentO()->ipaddr;
     $this->setUpdateSubaction();
     $this->write();
     if ($olddom) {
         $odo = new Web(null, $this->syncserver, $olddom);
         $odo->get();
         // Need to get the client here itself so that it won't run into problems later. You don't need the client anymore...
         //$odo->getParentO()->getParentO();
         if ($odo->dbaction !== 'add') {
             $odo->setUpdateSubaction('fixipdomain');
             $odo->was();
         }
     }
     if ($olddom === $newdom) {
         return;
     }
     if (is_disabled($newdom)) {
         return;
     }
     $ndo = new Web(null, $this->syncserver, $newdom);
     $ndo->get();
     //$ndo->getParentO()->getParentO(); //you don't need client anymore..
     $ndo->setUpdateSubaction('fixipdomain');
     $ndo->was();
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:39,代码来源:domainipaddresslib.php

示例2: array

        $this->response->status($code);
        $this->response->headers->set("Content-Type", "application/json");
        echo json_encode(array("errors" => array($err)));
    }
    function authed()
    {
        return isset($_SESSION["adminid"]);
    }
}
$app = new Web(array("debug" => false));
$app->add(new Slim\Middleware\ContentTypes());
$app->notFound(function () use($app) {
    echo "Requested resource not found";
});
$app->get("/", function () use($app) {
    $app->redirect("/");
});
$app->get("/plans", function () use($app) {
    if (!$app->authed()) {
        $app->makeError("Access denied");
        return;
    }
    $qres = mysql_query("SELECT * FROM `tblproducts` p WHERE p.`type` IN ( 'hostingaccount','reselleraccount') and p.`configoption1` != '' and p.`servertype` = 'cpanel';");
    if ($qres === FALSE) {
        $app->makeError("Unable to get the list of hosting packages");
        return;
    }
    $plans = array();
    while (($row = mysql_fetch_assoc($qres)) !== FALSE) {
        $plans[] = array("id" => intval($row["id"]), "label" => $row["name"], "description" => $row["description"], "name" => $row["configoption1"], "limits" => array("ftp" => intval($row["configoption2"]), "disk" => intval($row["configoption3"]), "email" => intval($row["configoption4"]), "bandwidth" => intval($row["configoption5"]), "dedicated_ip" => onoffval($row["configoption6"]), "ssh" => onoffval($row["configoption7"]), "databases" => intval($row["configoption8"]), "cgi" => onoffval($row["configoption9"]), "subdomains" => intval($row["configoption10"]), "frontpage" => onoffval($row["configoption11"]), "parked" => intval($row["configoption12"]), "addon" => intval($row["configoption14"]), "overage" => strval($row["overagesenabled"][0]) === "1"));
    }
开发者ID:arktisma,项目名称:whmcs_whmpackageeditor,代码行数:31,代码来源:index.php


注:本文中的Web::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。