index.php

  1. 7.x drupal-7.x/index.php
  2. 7.x documentation-7.x/developer/index.php
  3. 6.x drupal-6.x/index.php
  4. 6.x documentation-6.x/developer/index.php

The PHP page that serves all page requests on a Drupal installation.

The routines here dispatch control to the appropriate handler, which then prints the appropriate page.

All Drupal code is released under the GNU General Public License. See COPYRIGHT.txt and LICENSE.txt.

File

drupal-6.x/index.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * The PHP page that serves all page requests on a Drupal installation.
  5. *
  6. * The routines here dispatch control to the appropriate handler, which then
  7. * prints the appropriate page.
  8. *
  9. * All Drupal code is released under the GNU General Public License.
  10. * See COPYRIGHT.txt and LICENSE.txt.
  11. */
  12. require_once './includes/bootstrap.inc';
  13. drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
  14. $return = menu_execute_active_handler();
  15. // Menu status constants are integers; page content is a string.
  16. if (is_int($return)) {
  17. switch ($return) {
  18. case MENU_NOT_FOUND:
  19. drupal_not_found();
  20. break;
  21. case MENU_ACCESS_DENIED:
  22. drupal_access_denied();
  23. break;
  24. case MENU_SITE_OFFLINE:
  25. drupal_site_offline();
  26. break;
  27. }
  28. }
  29. elseif (isset($return)) {
  30. // Print any value (including an empty string) except NULL or undefined:
  31. print theme('page', $return);
  32. }
  33. drupal_page_footer();