 <?php 
include "../config.php";
include "../include/conn.mysql.php";
  //用于下载TXT文本
$sql="SELECT bbsid,userid,title,content,pic,name,v,time,gro,zip,zan,xi,nu,zipstr,viewType,viewValue FROM bbs WHERE bbsid=
'{$_GET['id']}'";
$view = mysql_query($sql);
if($view && mysql_num_rows($view)>0){
list($bbsid,$userid,$title,$content,$pic,$name,$v,$time,$hgro,$zip,$zan,$xi,$nu,$zipstr,$viewType,$viewValue) = mysql_fetch_row($view);
$filename = $title.'.txt';
  header("Content-type: text/plain");
  header("Accept-Ranges: bytes");
  header("Content-Disposition: attachment; filename=".$filename);
  header("Cache-Control: must-revalidate, post-check=0, pre-check=0" );
  header("Pragma: no-cache" );
  header("Expires: 0" );

echo  $title;
echo  '<br>----------<br>';
echo  '来源/作者'.$name;
echo  '<br>----------<br>';
echo  '时间'.$time;
echo  '<br>----------<br>';
echo  $content;}else{}
  exit($str);
  ?>