Welcome Guest, Not a member yet? Register   Sign In
CI from command line. $_SERVER['SCRIPT_NAME'] not populated.
#2

[eluser]Phil Sturgeon[/eluser]
You can do. There are several different ways to check if PHP is called via command line or the browser. I always use $_SERVER['REQUEST_URI'] but it doesn't really matter.

Just do a print_r($_SERVER) and see what you have to work with. $_SERVER[argv][0] will always be the file name anyway.

Edit: Annoyed with the poster of that blog article, his way of getting CI on the command line is better. :-(


Messages In This Thread
CI from command line. $_SERVER['SCRIPT_NAME'] not populated. - by El Forum - 01-07-2009, 06:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB