1.提交缺失的东西
This commit is contained in:
@ -57,18 +57,22 @@ class UrlServer
|
|||||||
}
|
}
|
||||||
|
|
||||||
$protocol = is_https() ? 'https://' : 'http://';
|
$protocol = is_https() ? 'https://' : 'http://';
|
||||||
$file_url = config('project.file_domain');
|
|
||||||
if ($file_url[strlen($file_url) - 1] == '/') {
|
|
||||||
$file_url = substr($file_url,0,strlen($file_url)-1);
|
|
||||||
|
|
||||||
$port = request()->port();
|
|
||||||
$port = in_array($port, [ '80', '443' ]) ? '' : ":{$port}";
|
|
||||||
|
|
||||||
$file_url .= $port;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $protocol . $file_url . $uri;
|
|
||||||
|
|
||||||
|
$file_url = config('project.file_domain');
|
||||||
|
|
||||||
|
// if ($file_url[strlen($file_url) - 1] == '/') {
|
||||||
|
// $file_url = substr($file_url,0,strlen($file_url)-1);
|
||||||
|
//
|
||||||
|
// $port = request()->port();
|
||||||
|
// $port = in_array($port, [ '80', '443' ]) ? '' : ":{$port}";
|
||||||
|
//
|
||||||
|
// $file_url .= $port;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// return $protocol . $file_url . $uri;
|
||||||
|
$domain = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://";
|
||||||
|
$domain .= $_SERVER['HTTP_HOST'];
|
||||||
|
return $domain.$uri;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$config = ConfigServer::get('storage_engine',$engine);
|
$config = ConfigServer::get('storage_engine',$engine);
|
||||||
|
|||||||
Reference in New Issue
Block a user