本文整理匯總了PHP中Armory::cacheconfig方法的典型用法代碼示例。如果您正苦於以下問題:PHP Armory::cacheconfig方法的具體用法?PHP Armory::cacheconfig怎麽用?PHP Armory::cacheconfig使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Armory
的用法示例。
在下文中一共展示了Armory::cacheconfig方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: die
}
// We are forced to load APC cache, enabled or not
if (!(include __ARMORYDIRECTORY__ . '/includes/classes/cache/cache.apc.php')) {
die('<b>Error:</b> unable to load apc cache class!');
}
if (Armory::$armoryconfig['useApc'] == true) {
if (!(include __ARMORYDIRECTORY__ . '/includes/cache_config.php')) {
die('<b>Error:</b> unable to load cache config!');
}
// Make sure APC is installed
if (!function_exists('apc_fetch')) {
die('<b>Error:</b> APC is enabled in configuation, but is not installed on php');
}
}
Armory::$cache = new ApcCache();
Armory::$cacheconfig = $cacheConfig;
/* Check DbVersion */
$dbVersion = Armory::$aDB->selectCell("SELECT `version` FROM `ARMORYDBPREFIX_db_version`");
if ($dbVersion != DB_VERSION) {
if (!$dbVersion) {
if (isset(Armory::$armoryconfig['checkVersionType']) && Armory::$armoryconfig['checkVersionType'] == 'log') {
Armory::Log()->writeError('ArmoryChecker: wrong Armory DB name!');
} else {
echo '<b>Fatal error</b>: wrong Armory DB name<br/>';
}
}
$errorDBVersion = sprintf('Current version is %s but expected %s.<br />
Apply all neccessary updates from \'sql/updates\' folder and refresh this page.', $dbVersion ? "'" . $dbVersion . "'" : 'not defined', "'" . DB_VERSION . "'");
if (isset(Armory::$armoryconfig['checkVersionType']) && Armory::$armoryconfig['checkVersionType'] == 'log') {
Armory::Log()->writeError('ArmoryChecker : DB_VERSION error: %s', defined('DB_VERSION') ? $errorDBVersion : 'DB_VERSION constant not defined!');
} else {