diff --git a/api.php b/api.php deleted file mode 100644 index 219fd24f6..000000000 --- a/api.php +++ /dev/null @@ -1,17 +0,0 @@ - \ No newline at end of file diff --git a/application/common.php b/application/common.php index e17112c79..585e0990d 100755 --- a/application/common.php +++ b/application/common.php @@ -437,15 +437,9 @@ function MyUrl($path, $params=[]) // 避免从后台生成url入口错误 $script_name = CurrentScriptName(); - if($script_name != 'index.php') + if($script_name != 'index.php' && substr($path, 0, 6) != 'admin/') { - if(substr($path, 0, 6) == 'index/') - { - $url = str_replace($script_name, 'index.php', $url); - } elseif(substr($path, 0, 4) == 'api/') - { - $url = str_replace($script_name, 'api.php', $url); - } + $url = str_replace($script_name, 'index.php', $url); } return $url; diff --git a/public/api.php b/public/api.php deleted file mode 100644 index c897aa310..000000000 --- a/public/api.php +++ /dev/null @@ -1,25 +0,0 @@ -run()->send(); -?> \ No newline at end of file