Skip to content

Instantly share code, notes, and snippets.

@kylebragger
Created June 25, 2010 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylebragger/0affe07a5d6725721b82 to your computer and use it in GitHub Desktop.
Save kylebragger/0affe07a5d6725721b82 to your computer and use it in GitHub Desktop.
set_time_limit(0);
ini_set('memory_limit', '128M');
if (isset($_SERVER['REMOTE_ADDR'])) die('in a fire');
define('CMD', true);
unset($argv[0]);
$_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'] = '/' . implode('/', $argv) . '/';
$fixed_base = str_replace('cli.php', '', __FILE__);
// later on...
$system_folder = $fixed_base . 'system';
$application_folder = $fixed_base . 'app';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment