Improve usage in command line
This commit is contained in:
parent
160490215d
commit
cf2f3ba3f6
1 changed files with 10 additions and 10 deletions
|
|
@ -369,16 +369,16 @@ define("ARROWUP","⇧");
|
|||
// Url of NOALYSS (http://...)
|
||||
//
|
||||
if (!defined("NOALYSS_URL")) {
|
||||
if ( isset ( $_SERVER)) {
|
||||
$protocol = "http";
|
||||
if (isset ($_SERVER['REQUEST_SCHEME'])) {
|
||||
$protocol = $_SERVER['REQUEST_SCHEME'];
|
||||
}
|
||||
$base = $protocol . '://' .
|
||||
$_SERVER['SERVER_NAME'] .
|
||||
":" . $_SERVER['SERVER_PORT'] .
|
||||
dirname($_SERVER['PHP_SELF']);
|
||||
define("NOALYSS_URL", $base);
|
||||
if ( isset ( $_SERVER['SERVER_NAME'])) {
|
||||
$protocol = "http";
|
||||
if (isset ($_SERVER['REQUEST_SCHEME'])) {
|
||||
$protocol = $_SERVER['REQUEST_SCHEME'];
|
||||
}
|
||||
$base = $protocol . '://' .
|
||||
$_SERVER['SERVER_NAME'] .
|
||||
":" . $_SERVER['SERVER_PORT'] .
|
||||
dirname($_SERVER['PHP_SELF']);
|
||||
define("NOALYSS_URL", $base);
|
||||
}else {
|
||||
define("NOALYSS_URL","command-line");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue