Commit 38119395 authored by hezhen's avatar hezhen

123

parent abc30fdc
...@@ -7523,13 +7523,15 @@ class longbing_companyModuleWxapp extends WeModuleWxapp ...@@ -7523,13 +7523,15 @@ class longbing_companyModuleWxapp extends WeModuleWxapp
return $path; return $path;
} }
$local_url=$path;
$local_url= str_replace("https://mp.dfangche.com","https://10.5.52.4",$local_url);
$local_url= str_replace("https://xxmp.upyuns.com","https://10.5.52.4",$local_url);
if (!strstr($path, $_SERVER['HTTP_HOST'])) { if (!strstr($path, $_SERVER['HTTP_HOST'])) {
file_put_contents(ATTACHMENT_ROOT . '/' . $fileName, $this->http_file_get($path)); file_put_contents(ATTACHMENT_ROOT . '/' . $fileName, $this->http_file_get($local_url));
$path = $_W['siteroot'] . $_W['config']['upload']['attachdir'] . '/' . $fileName; $path = $_W['siteroot'] . $_W['config']['upload']['attachdir'] . '/' . $fileName;
} }
else if (strstr($path, '.' . $_SERVER['HTTP_HOST'])) { else if (strstr($path, '.' . $_SERVER['HTTP_HOST'])) {
file_put_contents(ATTACHMENT_ROOT . '/' . $fileName, $this->http_file_get($path)); file_put_contents(ATTACHMENT_ROOT . '/' . $fileName, $this->http_file_get($local_url));
$path = $_W['siteroot'] . $_W['config']['upload']['attachdir'] . '/' . $fileName; $path = $_W['siteroot'] . $_W['config']['upload']['attachdir'] . '/' . $fileName;
} }
else { else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment