alert("非法连接 !"); location.replace ("index.php") '; exit(); } $filename=$_GET['file']; if (!file_exists(dirname(__FILE__).$filename)) { //检查文件是否存在 echo "文件找不到"; exit; } else { header("Content-Type: application/force-download"); header("Content-Disposition: attachment; filename=".basename($filename)); readfile($filename); } ?>