Created
July 21, 2013 16:33
-
-
Save klan/6049066 to your computer and use it in GitHub Desktop.
Drupal bootstrap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Get path of drupal install and strip path to module | |
$drupal_path = preg_replace('@\/sites\/[a-zA-Z_/]+@i', '', getcwd()); | |
// Create a constant DRUPAL_ROOT that defines our path to the drupal install | |
define('DRUPAL_ROOT', $drupal_path); | |
// require bootstrap | |
require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; | |
// bootstrap full | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment