當前位置: 首頁>>代碼示例>>PHP>>正文


PHP helper::getDB方法代碼示例

本文整理匯總了PHP中helper::getDB方法的典型用法代碼示例。如果您正苦於以下問題:PHP helper::getDB方法的具體用法?PHP helper::getDB怎麽用?PHP helper::getDB使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在helper的用法示例。


在下文中一共展示了helper::getDB方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct()
 {
     global $table;
     $this->table = $table;
     $this->cdb = helper::getDB('phpcms');
     $this->wdb = helper::getDB('cmsware');
 }
開發者ID:lestatmq,項目名稱:cms,代碼行數:7,代碼來源:base.php

示例2: syncContent

 public function syncContent()
 {
     $start = time();
     $id = $this->indexid;
     $wdb = helper::getDB('cmsware');
     $cdb = helper::getDB('phpcms');
     $sql = "select IndexID from cmsware_content_index where IndexID >= {$this->indexid} order by IndexID asc limit 10000";
     $res = $wdb->fetchAll($sql);
     foreach ($res as $k => $v) {
         $id = $v['IndexID'];
         error_log($id . "\n", 3, "process{$this->indexid}.log");
         $url = sprintf(ADDCONENTURL, $id);
         $res = curl_post($url, array());
         $tmp = json_decode($res, true);
         if (!isset($tmp['status']) || $tmp['status'] != 1) {
             error_log($id . "\t" . strip_tags($res) . "\n", 3, "fail_content.log");
         }
     }
     $end = time();
     error_log($end - $start . "\n", 3, "time");
 }
開發者ID:lestatmq,項目名稱:cms,代碼行數:21,代碼來源:syncContent.php

示例3: syncTableModel

        $obj->run();
    }
    public function syncTableModel()
    {
        $obj = new tableid();
        $obj->run();
    }
}
$obj = new syncPHPcms();
$res = $obj->loginCms();
if ($res) {
    $obj->syncSite();
    $obj->syncModel();
    $obj->syncModelFields();
    if (is_file("alter.sql")) {
        $cdb = helper::getDB("phpcms");
        $c = file("alter.sql");
        foreach ($c as $v) {
            $sql = trim($v);
            $res = $cdb->execute($sql);
        }
    }
    $obj->syncUrlrule();
    $obj->syncCategory();
    //$obj->syncIndexId();
    $obj->syncHists();
    //$obj->syncTableModel();
    $obj->syncAdminUser();
} else {
    exit("登陸錯誤了");
}
開發者ID:lestatmq,項目名稱:cms,代碼行數:31,代碼來源:syncPHPcms.php

示例4: __construct

 public function __construct()
 {
     $this->wdb = helper::getDB('cmsware');
     $this->getBaseWareSites();
     $this->getcmsware_psn();
 }
開發者ID:lestatmq,項目名稱:cms,代碼行數:6,代碼來源:sites.php

示例5: max

<?php

require_once __DIR__ . "/../init.php";
$db = helper::getDB("cmsware");
$sql = "select max(IndexID) as cnt from cmsware_content_index";
$res = $db->fetchOne($sql);
$max = $res['cnt'];
for ($i = 1; $i <= $max; $i = $i + 10000) {
    echo "php syncContent.php {$i} &\n";
}
開發者ID:lestatmq,項目名稱:cms,代碼行數:10,代碼來源:gen.php


注:本文中的helper::getDB方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。