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


PHP connect::getConfig方法代碼示例

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


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

示例1: session

// language selection by settings
if (SETTINGS_SITE_LANGUAGE && file_exists(ROOT . 'languages/' . SETTINGS_SITE_LANGUAGE . '.php')) {
    include_once ROOT . 'languages/' . SETTINGS_SITE_LANGUAGE . '.php';
}
include_once ROOT . 'languages/default.php';
if (defined('SETTINGS_SITE_TIMEZONE')) {
    ini_set('date.timezone', SETTINGS_SITE_TIMEZONE);
}
$session = new session("prj");
set_time_limit(0);
$socket_connected = 0;
$latest_urls_time = 0;
while (1) {
    include_once DIR_MODULES . 'connect/connect.class.php';
    $connect = new connect();
    $connect->getConfig();
    if (!$connect->config['CONNECT_SYNC']) {
        echo "Connect sync turned off.";
        exit;
    } else {
        /*
        $connect->sendMenu(1);
        */
        $sqlQuery = "SELECT *\n                     FROM commands";
        $commands = SQLSelect($sqlQuery);
        $total = count($commands);
        for ($i = 0; $i < $total; $i++) {
            $cmd_values[$commands[$i]['ID']] = $commands[$i]['CUR_VALUE'];
            $cmd_titles[$commands[$i]['ID']] = $commands[$i]['RENDER_TITLE'];
            $cmd_data[$commands[$i]['ID']] = $commands[$i]['RENDER_DATA'];
        }
開發者ID:cdkisa,項目名稱:majordomo,代碼行數:31,代碼來源:cycle_connect.php

示例2: getConnectDetails

 function getConnectDetails()
 {
     if (!$this->connect_username && !$this->connect_password) {
         include_once DIR_MODULES . 'connect/connect.class.php';
         $cn = new connect();
         $cn->getConfig();
         if ($cn->config['CONNECT_USERNAME'] && $cn->config['CONNECT_PASSWORD']) {
             $this->connect_username = $cn->config['CONNECT_USERNAME'];
             $this->connect_password = $cn->config['CONNECT_PASSWORD'];
         } else {
             $this->connect_username = 'anonymous';
             $this->connect_password = '';
         }
     }
 }
開發者ID:AirKing555,項目名稱:majordomo,代碼行數:15,代碼來源:patterns.class.php


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