$url='http://apply.com/static/upload/head/20190711/d612d32ac92be41a64ffb091fad01508.png';
$file_name = time().'.png'; //保存的图片名称
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.$file_name);
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($url));
ob_clean();
flush();
readfile($url);
exit;
a标签点击图片链接下载到本地
还不快抢沙发
最新回复
haha: 887878
refewf: wefewfre
refewf: ededededeed