在本地运行下载是可以打开图片的,都正常,到linux服务器上,下载下来的图片就损坏了,打不开了
这是我的头信息
header('Content-type: application/jpg');
header('Content-Disposition: attachment; filename="'.$acountinfo['license_file'].'"');
readfile("$licenseURL");
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
具体问题具体分析,你给的信息是有限的,这个要从多方面排查
1,文件路径是否正确
2,图片是否为0 size
3, 图片是否完整,有的是网络问题,下载一半就超时。