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