本文整理汇总了PHP中AppKernel::getConfigurationFile方法的典型用法代码示例。如果您正苦于以下问题:PHP AppKernel::getConfigurationFile方法的具体用法?PHP AppKernel::getConfigurationFile怎么用?PHP AppKernel::getConfigurationFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppKernel
的用法示例。
在下文中一共展示了AppKernel::getConfigurationFile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AppKernel
* @todo use the $_configuration array for all the needed variables
* @todo remove the code that displays the button that links to the install page
* but use a redirect immediately. By doing so the $alreadyInstalled variable can be removed.
* @todo make it possible to enable / disable the tracking through the Chamilo config page.
*
*/
// Showing/hiding error codes in global error messages.
define('SHOW_ERROR_CODES', false);
require_once __DIR__ . '/../../app/AppKernel.php';
$kernel = new AppKernel();
// Determine the directory path where this current file lies.
// This path will be useful to include the other initialisation files.
$includePath = __DIR__;
// Include the main Chamilo platform configuration file.
$alreadyInstalled = false;
if (file_exists($kernel->getConfigurationFile())) {
require_once $kernel->getConfigurationFile();
$alreadyInstalled = true;
} else {
$_configuration = array();
}
//Redirects to the main/install/ page
if (!$alreadyInstalled) {
$global_error_code = 2;
// The system has not been installed yet.
require $includePath . '/global_error_message.inc.php';
die;
}
// Ensure that _configuration is in the global scope before loading
// main_api.lib.php. This is particularly helpful for unit tests
if (!isset($GLOBALS['_configuration'])) {