当前位置: 首页>>代码示例>>PHP>>正文


PHP AppKernel::getConfigurationFile方法代码示例

本文整理汇总了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'])) {
开发者ID:daffef,项目名称:chamilo-lms,代码行数:31,代码来源:global.inc.php


注:本文中的AppKernel::getConfigurationFile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。