/*** @notes: 获取文件链接* @param string|null $uri*/ function get_file_url($uri) {if (empty($uri)) {return '';}if (strstr($uri, 'http://') || strstr($uri, 'https://')) {$uri = str_replace('\\', '/', $uri);return preg_replace('~(^|[^:])//+~', '\1/', $uri);} else {$domain = request()->domain();$uri = $domain . '/' . $uri;// $uri = (is_https() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $uri;$uri = str_replace('\\', '/', $uri);return preg_replace('~(^|[^:])//+~', '\1/', $uri);} }