index.php 860 Bytes
Newer Older
1
<?php
Dries's avatar
Dries committed
2

3 4 5 6
/**
 * @file
 * The PHP page that serves all page requests on a Drupal installation.
 *
7
 * All Drupal code is released under the GNU General Public License.
8
 * See COPYRIGHT.txt and LICENSE.txt files in the "core" directory.
9 10
 */

11 12
use Drupal\Core\Site\Settings;

13 14
require_once __DIR__ . '/core/vendor/autoload.php';
require_once __DIR__ . '/core/includes/bootstrap.inc';
15

16
try {
17
  drupal_handle_request();
18 19
}
catch (Exception $e) {
20
  $message = 'If you have just changed code (for example deployed a new module or moved an existing one) read <a href="http://drupal.org/documentation/rebuild">http://drupal.org/documentation/rebuild</a>';
21
  if (Settings::get('rebuild_access', FALSE)) {
22 23 24 25
    $rebuild_path = $GLOBALS['base_url'] . '/rebuild.php';
    $message .= " or run the <a href=\"$rebuild_path\">rebuild script</a>";
  }
  print $message;
26 27
  throw $e;
}