diff --git a/extend/service/FileService.php b/extend/service/FileService.php index 6d88946d4..1b58d1065 100644 --- a/extend/service/FileService.php +++ b/extend/service/FileService.php @@ -156,7 +156,7 @@ class FileService */ public static function getBaseUriLocal() { - $appRoot = request()->root(true); // 如果你想获取相对url地址,这里把掉参数 true + $appRoot = trim(request()->root(true),'\\/'); // 如果你想获取相对url地址,这里把掉参数 true $uriRoot = preg_match('/\.php$/', $appRoot) ? dirname($appRoot) : $appRoot; return "{$uriRoot}/static/upload/"; }