Exemple #1
0
define('DC_ROOT', path::real(dirname(__FILE__) . '/..'));
define('DC_VERSION', '2.1.6');
define('DC_DIGESTS', dirname(__FILE__) . '/digests');
define('DC_L10N_ROOT', dirname(__FILE__) . '/../locales');
define('DC_L10N_UPDATE_URL', 'http://services.dotclear.net/dc2.l10n/?version=%s');
if (!defined('DC_VENDOR_NAME')) {
    define('DC_VENDOR_NAME', 'Dotclear');
}
if (!defined('DC_XMLRPC_URL')) {
    define('DC_XMLRPC_URL', '%1$sxmlrpc/%2$s');
}
if (!defined('DC_ADMIN_SSL')) {
    define('DC_ADMIN_SSL', false);
}
if (defined('DC_FORCE_SCHEME_443') && DC_FORCE_SCHEME_443) {
    http::$https_scheme_on_443 = true;
}
if (!defined('DC_DBPERSIST')) {
    define('DC_DBPERSIST', false);
}
if (!defined('DC_UPDATE_URL')) {
    define('DC_UPDATE_URL', 'http://download.dotclear.net/versions.xml');
}
if (!defined('DC_UPDATE_VERSION')) {
    define('DC_UPDATE_VERSION', 'stable');
}
try {
    $core = new dcCore(DC_DBDRIVER, DC_DBHOST, DC_DBNAME, DC_DBUSER, DC_DBPASSWORD, DC_DBPREFIX, DC_DBPERSIST);
} catch (Exception $e) {
    __error($e->getMessage(), $e->getCode() == 0 ? '<p>This either means that the username and password information in ' . 'your <strong>config.php</strong> file is incorrect or we can\'t contact ' . 'the database server at "<em>' . DC_DBHOST . '</em>". This could mean your ' . 'host\'s database server is down.</p> ' . '<ul><li>Are you sure you have the correct username and password?</li>' . '<li>Are you sure that you have typed the correct hostname?</li>' . '<li>Are you sure that the database server is running?</li></ul>' . '<p>If you\'re unsure what these terms mean you should probably contact ' . 'your host. If you still need help you can always visit the ' . '<a href="http://forum.dotclear.net/">Dotclear Support Forums</a>.</p>' : '', 20);
}