Skip to content

Instantly share code, notes, and snippets.

@jibran
Created February 21, 2017 04:00
Show Gist options
  • Save jibran/2ba1cf5105487599f38f0a98286b20a8 to your computer and use it in GitHub Desktop.
Save jibran/2ba1cf5105487599f38f0a98286b20a8 to your computer and use it in GitHub Desktop.
Drupal minimal bootstrap.
<?php
/**
* @file
* Drupal minimal bootstrap.
*/
use Drupal\Core\DrupalKernel;
use Symfony\Component\HttpFoundation\Request;
$autoloader = require_once 'autoload.php';
$kernel = DrupalKernel::createFromRequest(Request::createFromGlobals(), $autoloader, 'prod');
$kernel->loadLegacyIncludes();
$kernel->boot();
// Drupal code here.
@iamxwk
Copy link

iamxwk commented Apr 8, 2021

good !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment