本文整理汇总了PHP中titania::read_config_file方法的典型用法代码示例。如果您正苦于以下问题:PHP titania::read_config_file方法的具体用法?PHP titania::read_config_file怎么用?PHP titania::read_config_file使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类titania
的用法示例。
在下文中一共展示了titania::read_config_file方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: set_exception_handler
// Include the non-dynamic constants
require TITANIA_ROOT . 'includes/constants.' . PHP_EXT;
// Include core classes
require TITANIA_ROOT . 'includes/core/phpbb.' . PHP_EXT;
require TITANIA_ROOT . 'includes/core/titania.' . PHP_EXT;
// Include our core functions
titania::_include('functions');
set_exception_handler('titania_exception_handler');
// Set up our auto-loader
spl_autoload_register(array('titania', 'autoload'));
// Read config.php file
// 2 separate locations possible: within Titania directory and just outside of it.
if (file_exists(TITANIA_ROOT . 'config.' . PHP_EXT)) {
titania::read_config_file(TITANIA_ROOT . 'config.' . PHP_EXT);
} else {
titania::read_config_file(TITANIA_ROOT . '../config.' . PHP_EXT);
}
// Include the dynamic constants (after reading the Titania config file, but before loading the phpBB common file)
titania::_include('dynamic_constants');
// Decode the request
titania_url::decode_request();
// Include common phpBB files and functions.
if (!file_exists(PHPBB_ROOT_PATH . 'common.' . PHP_EXT)) {
die('<p>No phpBB installation found. Check the Titania configuration file.</p>');
}
if (!defined('PHPBB_INCLUDED')) {
require PHPBB_ROOT_PATH . 'common.' . PHP_EXT;
}
// Initialise phpBB
phpbb::initialise();
// If the database is not installed or outdated redirect to the installer