From 7f8d551fd08f45281310ec9b39aefa948b9de4e3 Mon Sep 17 00:00:00 2001 From: tianya Date: Thu, 1 Dec 2022 22:18:56 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/admin/templets/index_body.htm | 2 +- src/system/common.func.php | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/admin/templets/index_body.htm b/src/admin/templets/index_body.htm index 27541e87..860a335e 100644 --- a/src/admin/templets/index_body.htm +++ b/src/admin/templets/index_body.htm @@ -79,7 +79,7 @@

WEB服务器

- +
diff --git a/src/system/common.func.php b/src/system/common.func.php index 242a09f5..fa70d5ff 100755 --- a/src/system/common.func.php +++ b/src/system/common.func.php @@ -390,6 +390,22 @@ function TableHasField($tablename,$field) } return false; } +function GetSimpleServerSoftware() +{ + if (preg_match("#^php#i",$_SERVER["SERVER_SOFTWARE"])) { + return 'PHP Server'; + } else if(preg_match("#^apache#i",$_SERVER["SERVER_SOFTWARE"])){ + return 'Apache'; + } else if(preg_match("#^nginx#i",$_SERVER["SERVER_SOFTWARE"])){ + return 'Nginx'; + } else if(preg_match("#^microsoft-iis#i",$_SERVER["SERVER_SOFTWARE"])){ + return 'IIS'; + } else if(preg_match("#^caddy#i",$_SERVER["SERVER_SOFTWARE"])){ + return 'Caddy'; + } else { + return 'Other'; + } +} /** * 获取验证码的session值 *