function hook_boot

7.x system.api.php hook_boot()
6.x core.php hook_boot()

Perform setup tasks. See also, hook_init.

This hook is run at the beginning of the page request. It is typically used to set up global parameters which are needed later in the request.

Only use this hook if your code must run even for cached page views.This hook is called before modules or most include files are loaded into memory. It happens while Drupal is still in bootstrap mode.

Return value

None.

Related topics

2 invocations of hook_boot()
system_performance_settings in drupal-6.x/modules/system/system.admin.inc
Form builder; Configure site performance settings.
_drupal_bootstrap in drupal-6.x/includes/bootstrap.inc

File

documentation-6.x/developer/hooks/core.php, line 929
These are the hooks that are invoked by the Drupal core.

Code

function hook_boot() {
  // we need user_access() in the shutdown function. make sure it gets loaded
  drupal_load('module', 'user');
  register_shutdown_function('devel_shutdown');
}