|
...
|
...
|
@@ -526,9 +526,9 @@ if (!function_exists('str_replace_url')) { |
|
|
|
$urlParts = parse_url($url);
|
|
|
|
// 检查是否存在 host(域名)部分
|
|
|
|
if (isset($urlParts['host'])) {
|
|
|
|
$domain = $urlParts['host'];
|
|
|
|
$path = $urlParts['path'];
|
|
|
|
// 使用 str_replace 函数删除域名信息
|
|
|
|
$urlWithoutDomain = str_replace($domain.'upload', '', $url);
|
|
|
|
$urlWithoutDomain = str_replace('upload', '', $url);
|
|
|
|
return $urlWithoutDomain;
|
|
|
|
} else {
|
|
|
|
return $url;
|
...
|
...
|
|