Skip to content

Instantly share code, notes, and snippets.

@zroger
Created March 16, 2011 19:53
Show Gist options
  • Save zroger/873181 to your computer and use it in GitHub Desktop.
Save zroger/873181 to your computer and use it in GitHub Desktop.
<?php
/**
* @file
* This is a modified version of index.php, to be used with phpsh.
*/
/**
* Root directory of Drupal installation.
*/
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
// Fake a minimal $_SERVER array.
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
$_SERVER['SCRIPT_NAME'] = 'index.php';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment