作者 刘锟

合并分支 'akun' 到 'master'

update



查看合并请求 !2740
... ... @@ -1532,21 +1532,30 @@ function thumbImageByUrl($url, $width = 360)
return $url;
}
function checkRemoteFileExists($url)
{
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_NOBODY, true);
$result = curl_exec($curl);
$found = false;
if ($result !== false) {
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($statusCode == 200) {
$found = true;
if (!function_exists('checkRemoteFileExists')) {
/**
* 判断远程文件是否存在
* @param $url
* @return bool
* @author Akun
* @date 2025/09/05 9:58
*/
function checkRemoteFileExists($url)
{
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_NOBODY, true);
$result = curl_exec($curl);
$found = false;
if ($result !== false) {
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($statusCode == 200) {
$found = true;
}
}
}
curl_close($curl);
curl_close($curl);
return $found;
return $found;
}
}
if (!function_exists('httpGetSsl')) {
... ...