Created
September 5, 2013 23:47
-
-
Save delphian/6457774 to your computer and use it in GitHub Desktop.
Bootstrap Drupal multi-site for custom php script
This file contains 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 | |
// Needed for multisite bootstrap. | |
$_SERVER['HTTP_HOST'] = 'domainname.org'; | |
// Name of this script. Include forward slash. | |
$_SERVER['SCRIPT_NAME'] = '/' . 'bootstrap-drupal.php'; | |
// Set this to avoid php warnings. | |
$_SERVER['REMOTE_ADDR'] = ''; | |
define('DRUPAL_ROOT', '/Absolute/path/domainname.org'); | |
require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; | |
// Bootstrap drupal. | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment