本文整理匯總了PHP中CB\Config::getPlatformDBConfig方法的典型用法代碼示例。如果您正苦於以下問題:PHP Config::getPlatformDBConfig方法的具體用法?PHP Config::getPlatformDBConfig怎麽用?PHP Config::getPlatformDBConfig使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CB\Config
的用法示例。
在下文中一共展示了Config::getPlatformDBConfig方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: dirname
#!/usr/bin/php
<?php
/**
* languagess
*/
namespace CB;
use CB\L;
$path = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'httpsdocs' . DIRECTORY_SEPARATOR;
require_once $path . 'config_platform.php';
require_once LIB_DIR . 'language_functions.php';
// select main translations
$T = array();
$cfg = Config::getPlatformDBConfig();
$res = DB\dbQuery('SELECT *
FROM ' . \CB\PREFIX . '_casebox.translations
WHERE `type` in (0, 2)');
while ($r = $res->fetch_assoc()) {
foreach ($r as $k => $v) {
if (strlen($k) == 2 && $k != 'id' && !empty($v)) {
$T[$k][] = "'" . $r['name'] . "':'" . addcslashes($v, "'") . "'";
}
}
}
$res->close();
//save each translations as main language file
saveFiles($T);
echo "main language files saved\n";
//iterate cores and collect those that have custom translations
$cores = array();
$res = DB\dbQuery('SELECT name, cfg