Exemple #1
0
}
// Include default constants if none were defined elsewhere.
if (!defined('VANILLA_CONSTANTS')) {
    include PATH_CONF . '/constants.php';
}
// Make sure a default time zone is set.
// Do NOT edit this. See config `Garden.GuestTimeZone`.
date_default_timezone_set('UTC');
// Make sure the mb_* functions are utf8.
if (function_exists('mb_internal_encoding')) {
    mb_internal_encoding('UTF-8');
}
// Include the core autoloader.
require_once __DIR__ . '/vendor/autoload.php';
// Initialize the autoloader.
Gdn_Autoloader::start();
// Guard against broken cache files.
if (!class_exists('Gdn')) {
    // Throwing an exception here would result in a white screen for the user.
    // This error usually indicates the .ini files in /cache are out of date and should be deleted.
    exit("Class Gdn not found.");
}
// Cache Layer
Gdn::factoryInstall(Gdn::AliasCache, 'Gdn_Cache', null, Gdn::FactoryRealSingleton, 'Initialize');
// Install the configuration handler.
Gdn::factoryInstall(Gdn::AliasConfig, 'Gdn_Configuration');
// Load default baseline Garden configurations.
Gdn::config()->load(PATH_CONF . '/config-defaults.php');
// Load installation-specific configuration so that we know what apps are enabled.
Gdn::config()->load(Gdn::config()->defaultPath(), 'Configuration', true);
/**