This commit is contained in:
Gitea
2022-03-30 09:13:50 +08:00
parent 15dfc6576b
commit 557aa3c555
179 changed files with 6115 additions and 4092 deletions

View File

@@ -21,7 +21,7 @@ class Check
}
// 判断自动转换状态
if (function_exists("get_magic_quotes_gpc") && get_magic_quotes_gpc()) {
if (PHP_VERSION < '7.0' && function_exists("get_magic_quotes_gpc") && get_magic_quotes_gpc()) {
error('您的服务器环境PHP.ini中magic_quotes_gpc配置为On状态会导致数据存储异常请设置为Off状态或切换为更高版本PHP。');
}

File diff suppressed because one or more lines are too long

View File

@@ -118,16 +118,16 @@ class Url
$suffix = '/';
}
// 去除默认模块及控制器部分
$path = trim($path, '/');
$path = str_replace('home/Index', '', $path);
$path = trim($path, '/');
// 去除默认模块及控制器部分
$path = str_replace('home/Index/', '', $path);
if (! $path) {
if (! $path) { // 地址前缀
if ($url_rule_type == 1) {
$link = SITE_INDEX_DIR . '/index.php';
$link = SITE_INDEX_DIR . '/index.php/';
} elseif ($url_rule_type == 2) {
$link = SITE_INDEX_DIR;
$link = SITE_INDEX_DIR . '/';
} else {
$link = SITE_INDEX_DIR . '/?';
}