From c0f1888f627b7573968c3b11ca20d5981087b758 Mon Sep 17 00:00:00 2001 From: gongfuxiang <2499232802@qq.com> Date: Sun, 23 Jun 2019 00:41:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api.php | 17 ----------------- application/common.php | 10 ++-------- public/api.php | 25 ------------------------- 3 files changed, 2 insertions(+), 50 deletions(-) delete mode 100644 api.php delete mode 100644 public/api.php 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