drupal_exit

Versions
mediamosa-21
drupal_exit($destination = NULL)

Perform end-of-request tasks.

In some cases page requests need to end without calling drupal_page_footer(). In these cases, call drupal_exit() instead. There should rarely be a reason to call exit instead of drupal_exit();

Parameters

$destination If this function is called from drupal_goto(), then this argument will be a fully-qualified URL that is the destination of the redirect. This should be passed along to hook_exit() implementations.

▾ 16 functions call drupal_exit()

ajax_get_form in includes/ajax.inc
Get a form submitted via #ajax during an AJAX callback.
contact_personal_form in modules/contact/contact.pages.inc
Form builder; the personal contact form.
contact_site_form in modules/contact/contact.pages.inc
Form builder; the site-wide contact form.
dashboard_show_block_content in modules/dashboard/dashboard.module
AJAX callback to display the rendered contents of a specific block.
dashboard_show_disabled in modules/dashboard/dashboard.module
AJAX callback to show disabled blocks in the dashboard customization mode.
dashboard_update in modules/dashboard/dashboard.module
Set the new weight of each region according to the drag-and-drop order.
drupal_goto in includes/common.inc
Send the user to a different Drupal page.
file_transfer in includes/file.inc
Transfer file using HTTP to client.
image_style_generate in modules/image/image.module
Menu callback; Given a style and image path, generate a derivative.
install_goto in includes/install.inc
Send the user to a different installer page.
locale_languages_delete_form in modules/locale/locale.admin.inc
User interface for the language deletion confirmation screen.
locale_languages_edit_form in modules/locale/locale.admin.inc
Editing screen for a particular language.
openid_redirect in modules/openid/openid.inc
Creates a js auto-submit redirect for (for the 2.x protocol)
openid_redirect_http in modules/openid/openid.inc
Performs an HTTP 302 redirect (for the 1.x protocol).
system_php in modules/system/system.admin.inc
Menu callback: return information about PHP.
xmlrpc_server_output in includes/xmlrpcs.inc

Code

includes/common.inc, line 2453

<?php
function drupal_exit($destination = NULL) {
  if (drupal_get_bootstrap_phase() == DRUPAL_BOOTSTRAP_FULL) {
    if (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update') {
      module_invoke_all('exit', $destination);
    }
    drupal_session_commit();
  }
  exit;
}
?>