System update (built-in server support)
This commit is contained in:
parent
719ab372de
commit
15ae1d1e80
|
@ -345,6 +345,7 @@ class YellowCore
|
||||||
$this->config->set("serverScheme", $scheme);
|
$this->config->set("serverScheme", $scheme);
|
||||||
$this->config->set("serverAddress", $address);
|
$this->config->set("serverAddress", $address);
|
||||||
$this->config->set("serverBase", $base);
|
$this->config->set("serverBase", $base);
|
||||||
|
if(defined("DEBUG") && DEBUG>=3) echo "YellowCore::getRequestInformation $scheme://$address$base<br/>\n";
|
||||||
}
|
}
|
||||||
$location = substru($this->toolbox->getLocation(), strlenu($base));
|
$location = substru($this->toolbox->getLocation(), strlenu($base));
|
||||||
if(empty($fileName)) $fileName = $this->lookup->findFileFromSystem($location);
|
if(empty($fileName)) $fileName = $this->lookup->findFileFromSystem($location);
|
||||||
|
@ -2667,7 +2668,7 @@ class YellowToolbox
|
||||||
function getBase()
|
function getBase()
|
||||||
{
|
{
|
||||||
$base = "";
|
$base = "";
|
||||||
if(preg_match("/^(.*)\//", $_SERVER["SCRIPT_NAME"], $matches)) $base = rtrim($matches[1], '/');
|
if(preg_match("/^(.*)\/.*\.php$/", $_SERVER["SCRIPT_NAME"], $matches)) $base = $matches[1];
|
||||||
return $base;
|
return $base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2781,7 +2782,7 @@ class YellowToolbox
|
||||||
// Check if script location is requested
|
// Check if script location is requested
|
||||||
function isRequestSelf()
|
function isRequestSelf()
|
||||||
{
|
{
|
||||||
return $_SERVER["REQUEST_URI"]==$_SERVER["SCRIPT_NAME"];
|
return substru($_SERVER["REQUEST_URI"], -10, 10)=="yellow.php";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if clean URL is requested
|
// Check if clean URL is requested
|
||||||
|
@ -3377,4 +3378,4 @@ function substrb() { return call_user_func_array("substr", func_get_args()); }
|
||||||
|
|
||||||
// Error reporting for PHP
|
// Error reporting for PHP
|
||||||
error_reporting(E_ALL ^ E_NOTICE);
|
error_reporting(E_ALL ^ E_NOTICE);
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue