Merge pull request #1274 from annando/issue-1218
Issue 1218: generate $argv and $argc from $_SERVER if it wasn't defined
This commit is contained in:
commit
418ac91c31
15 changed files with 53 additions and 54 deletions
8
boot.php
8
boot.php
|
|
@ -435,7 +435,7 @@ if(! class_exists('App')) {
|
|||
|
||||
function __construct() {
|
||||
|
||||
global $default_timezone, $argv, $argc;
|
||||
global $default_timezone;
|
||||
|
||||
$hostname = "";
|
||||
|
||||
|
|
@ -504,9 +504,9 @@ if(! class_exists('App')) {
|
|||
if ($hostname != "")
|
||||
$this->hostname = $hostname;
|
||||
|
||||
if (is_array($argv) && $argc>1 && substr(end($argv), 0, 4)=="http" ) {
|
||||
$this->set_baseurl(array_pop($argv) );
|
||||
$argc --;
|
||||
if (is_array($_SERVER["argv"]) && $_SERVER["argc"]>1 && substr(end($_SERVER["argv"]), 0, 4)=="http" ) {
|
||||
$this->set_baseurl(array_pop($_SERVER["argv"]) );
|
||||
$_SERVER["argc"] --;
|
||||
}
|
||||
|
||||
#set_include_path("include/$this->hostname" . PATH_SEPARATOR . get_include_path());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue