* [apv2] Fix webRoot.

This commit is contained in:
朱金勇
2025-10-14 14:54:04 +08:00
committed by Gitfox
parent 046f353aee
commit 298a59adc8
+16 -3
View File
@@ -107,9 +107,22 @@ class baseHelper
}
/* 生成url链接的开始部分。Set the begin parts of the link. */
if($config->requestType == 'PATH_INFO') $link = $config->webRoot . $appName;
if($config->requestType != 'PATH_INFO') $link = $config->webRoot . $appName . basename((string) $_SERVER['SCRIPT_NAME']);
if($config->requestType == 'PATH_INFO2') $link = '/';
if($app->apiVersion == 'v2')
{
$link = $config->webRoot . '/api.php/v2/';
}
else if($config->requestType == 'PATH_INFO2')
{
$link = '/';
}
else if($config->requestType == 'PATH_INFO')
{
$link = $config->webRoot . $appName;
}
else
{
$link = $config->webRoot . $appName . basename((string) $_SERVER['SCRIPT_NAME']);
}
/**
* #1: RequestType为GET。When the requestType is GET.