Permalink
Browse files

added cli.php; sane file/dir permissions

  • Loading branch information...
1 parent 3442814 commit 50b9a6228680bae51bddb6d97ae6b403b6945ebc @haliphax committed May 2, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 cli.php
View
@@ -0,0 +1,11 @@
+#!/usr/bin/php
+<?php
+set_time_limit(0);
+ini_set('memory_limit', '256M');
+if(isset($_SERVER['REMOTE_ADDR']))
+ exit(show_404();
+define('CMD', 1);
+unset($argv[0]);
+$_SERVER['QUERY_STRING'] = $_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'] = '/' . implode('/', $argv) . '/';
+include(dirname(__FILE__) . '/index.php');
+

1 comment on commit 50b9a62

@haliphax
Owner

I was mistaken; CodeIgniter does not play well out-of-the-box with CLI in all server environments. This is the CLI launch script I've been using for my own projects, and it works very well.

Please sign in to comment.