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