www.gusucode.com > 搜一次CMS电影程序 PHP 1.5源码程序 > admin/collect/artcollect/admin_rulesave.php
<?php $filename=$_GET['sname']; if(file_exists("rule/".$filename.".txt")){ $file=stripslashes(@file_get_contents("rule/".$filename.".txt")); }else{ $file="规则文件不存在@"; } $dest=$filename.".txt"; down_file($file,$dest); function down_file($content,$dest){ header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=$dest" ); header("Content-Transfer-Encoding: binary"); //header("Content-Length: ".filesize($file)); echo $content; } ?>