本文整理汇总了PHP中rex_path::coreData方法的典型用法代码示例。如果您正苦于以下问题:PHP rex_path::coreData方法的具体用法?PHP rex_path::coreData怎么用?PHP rex_path::coreData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rex_path
的用法示例。
在下文中一共展示了rex_path::coreData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
// echo nl2br(htmlspecialchars($cont));
if (rex_file::putConfig($configFile, $config) !== false) {
$info = rex_i18n::msg('setup_error1', '<a href="' . rex_url::backendController() . '">', '</a>');
header('Location:' . rex_url::backendController());
exit;
} else {
$error[] = rex_i18n::msg('setup_error2');
}
} elseif ($func == 'generate') {
// generate all articles,cats,templates,caches
$success = rex_delete_cache();
} elseif ($func == 'updateassets') {
rex_dir::copy(rex_path::core('assets'), rex_path::coreAssets());
$success = 'Updated assets';
} elseif ($func == 'updateinfos') {
$configFile = rex_path::coreData('config.yml');
$config = array_merge(rex_file::getConfig(rex_path::core('default.config.yml')), rex_file::getConfig($configFile));
$settings = rex_post('settings', 'array', []);
foreach (['server', 'servername', 'error_email', 'lang'] as $key) {
if (!isset($settings[$key]) || !$settings[$key]) {
$error[] = rex_i18n::msg($key . '_required');
continue;
}
$config[$key] = $settings[$key];
try {
rex::setProperty($key, $settings[$key]);
} catch (InvalidArgumentException $e) {
$error[] = rex_i18n::msg($key . '_invalid');
}
}
$config['debug'] = isset($settings['debug']) && $settings['debug'];
示例2: testCheckConnectionInvalidDatabase
public function testCheckConnectionInvalidDatabase()
{
$configFile = rex_path::coreData('config.yml');
$config = rex_file::getConfig($configFile);
$this->assertTrue(true !== rex_sql::checkDbConnection($config['db'][1]['host'], $config['db'][1]['login'], $config['db'][1]['password'], 'fu-database'));
}