_drupal_bootstrap
Definition
_drupal_bootstrap($phase)
includes/bootstrap.inc, line 789
Code
<?php
function _drupal_bootstrap($phase) {
global $conf;
switch ($phase) {
case DRUPAL_BOOTSTRAP_DATABASE:
drupal_unset_globals();
// Initialize the configuration
conf_init();
// Initialize the default database.
require_once './includes/database.inc';
db_set_active();
break;
case DRUPAL_BOOTSTRAP_SESSION:
require_once './includes/session.inc';
session_set_save_handler("sess_open", "sess_close", "sess_read", "sess_write", "sess_destroy", "sess_gc");
session_start();
break;
case DRUPAL_BOOTSTRAP_PAGE_CACHE:
require_once './includes/module.inc';
// Start a page timer:
timer_start('page');
// deny access to hosts which were banned. t() is not yet available.
if (drupal_is_denied('host', $_SERVER['REMOTE_ADDR'])) {
header('HTTP/1.0 403 Forbidden');
print 'Sorry, '. $_SERVER['REMOTE_ADDR']. ' has been banned.';
exit();
}
// Initialize configuration variables, using values from conf.php if available.
$conf = variable_init(isset($conf) ? $conf : array());
drupal_page_header();
break;
case DRUPAL_BOOTSTRAP_PATH:
require_once './includes/path.inc';
// Initialize $_GET['q'] prior to loading modules and invoking hook_init().
drupal_init_path();
break;
case DRUPAL_BOOTSTRAP_FULL:
require_once './includes/common.inc';
_drupal_bootstrap_full();
break;
}
}
?> 