From c992c7c9c03d0d3734c170b3eee663c15c9c904a Mon Sep 17 00:00:00 2001 From: sunson Date: Thu, 12 Dec 2024 15:51:16 +0800 Subject: [PATCH] Update index.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 兼容多平台多级目录。 --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 6d7b9d8..94285b7 100644 --- a/index.php +++ b/index.php @@ -7,7 +7,7 @@ if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') { $http = "https://"; } $base_dir = $http . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']); -if(substr($base_dir,-1,1)=="/"){$base_dir=substr($base_dir,0,str_len($base_dir)-1);} +if(substr($base_dir,-1,1)=="/"){$base_dir=substr($base_dir,0,-1);} $user = array("chate.store"); // 用户名,可多个 $pwd = array("123456"); // 密码,跟用户对应,请记得更换 if (isset($_GET['type'])) { @@ -114,7 +114,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['file'])) { - + SIW图床-基于PHP的图床服务