本文整理匯總了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'];
}
示例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 = '';
}
}
}