<?php $fileName=$_GET['file']; header('Content-type:application/force-download'); header('Content-Disposition:attachment;filename='.$fileName); $fp=fopen("文件目录".$fileName, "r"); $content=fread($fp, filesize("文件目录".$fileName)); echo $content; ?> 调用: http://../frostbelt_download.php?file=download.jpg