fix: fix: fix: fix: FC base_path
parent
c25df135ad
commit
a908ec285e
|
@ -41,7 +41,11 @@ function GetPathSetting($event, $context)
|
||||||
$path = $event['path'];
|
$path = $event['path'];
|
||||||
$tmp = $event['requestURI'];
|
$tmp = $event['requestURI'];
|
||||||
if (strpos($tmp, '?')) $tmp = substr($tmp, 0, strpos($tmp, '?'));
|
if (strpos($tmp, '?')) $tmp = substr($tmp, 0, strpos($tmp, '?'));
|
||||||
$_SERVER['base_path'] = substr($tmp, 0, -strlen($path)+1);
|
if ($path=='/'||$path=='') {
|
||||||
|
$_SERVER['base_path'] = $tmp;
|
||||||
|
} else {
|
||||||
|
$_SERVER['base_path'] = substr($tmp, 0, -strlen($path)+1);
|
||||||
|
}
|
||||||
|
|
||||||
if (substr($path,-1)=='/') $path=substr($path,0,-1);
|
if (substr($path,-1)=='/') $path=substr($path,0,-1);
|
||||||
$_SERVER['is_guestup_path'] = is_guestup_path($path);
|
$_SERVER['is_guestup_path'] = is_guestup_path($path);
|
||||||
|
|
Loading…
Reference in New Issue