更新时间:2022-10-03 14:19:19
1
2
3
4
5
6
|
<?php header( 'Content-Type:image/jpg' ); //设置图片类型
header( 'Content-Disposition:attachment;filename="test.jpg"' ); //描述下载文件
header( 'Content-Length:' . filesize ( 'images/649.562433.jpg' )); //定义下载文件大小
readfile( 'images/649.562433.jpg' ); //读取文件,执行下载
?>
|