drupal/index.php

35 lines
924 B
PHP

<?php
use Drupal\Core\DrupalApp;
use Symfony\Component\HttpFoundation\Request;
/**
* @file
* 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 files in the "core" directory.
*/
/**
* Root directory of Drupal installation.
*/
define('DRUPAL_ROOT', getcwd());
// Bootstrap the lowest level of what we need.
require_once DRUPAL_ROOT . '/core/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
// A request object from the HTTPFoundation to tell us about the request.
$request = Request::createFromGlobals();
$kernel = new DrupalApp();
$kernel->execute($request)->send();
//$response = router_execute_request($request);
// Output response.
//$response->send();