PHP download larger zip file is not fully downloaded
//下载zip包
$url = dirname($url) . '/' .$str_name['filename'] . '.zip';
$origin_size = get_headers($url,(bool)1);
$origin_size = $origin_size['Content-Length']??0;
$ch = curl_init($url);
//设置抓取的url
$dir = $upload_dir.'/' . $file_name;
$fp = fopen($dir, "wb");
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
$content = curl_exec($ch);
curl_close($ch);
fclose($fp);