Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added cli.php; sane file/dir permissions

  • Loading branch information...
commit 50b9a6228680bae51bddb6d97ae6b403b6945ebc 1 parent 3442814
Todd authored May 02, 2012

Showing 1 changed file with 11 additions and 0 deletions. Show diff stats Hide diff stats

  1. 11  cli.php
11  cli.php
... ...
@@ -0,0 +1,11 @@
  1
+#!/usr/bin/php
  2
+<?php
  3
+set_time_limit(0);
  4
+ini_set('memory_limit', '256M');
  5
+if(isset($_SERVER['REMOTE_ADDR']))
  6
+	exit(show_404();
  7
+define('CMD', 1);
  8
+unset($argv[0]);
  9
+$_SERVER['QUERY_STRING'] =  $_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'] = '/' . implode('/', $argv) . '/';
  10
+include(dirname(__FILE__) . '/index.php');
  11
+

1 note on commit 50b9a62

Todd
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.
Something went wrong with that request. Please try again.