index.php

  1. drupal
    1. 4.6 developer/index.php
    2. 4.6 index.php
    3. 4.7 index.php
    4. 4.7 developer/index.php
    5. 5 index.php
    6. 5 developer/index.php
    7. 6 developer/index.php
    8. 6 index.php
    9. 7 index.php
    10. 7 developer/index.php
    11. 8 index.php
    12. 8 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

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();
Login or register to post comments