header('Content-Type: application/octet-stream');
header('Content-type:text/plain');
if(preg_match("/MSIE/",$_SERVER['HTTP_USER_AGENT']) ){
header('Content-Disposition: attachment; filename="'.urlencode($txt_file).'"');
}else if(preg_match("/Firefox/",$_SERVER['HTTP_USER_AGENT'])){
header('Content-Disposition: attachment; filename*="utf8'.$txt_file.'"');
}else{
header('Content-Disposition: attachment; filename="'.$txt_file.'"');
}
header('Expires:0');
header('Cache-Control:must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
echo '这是 txt 里面的内容';
exit;
如果本文对您有所帮助,请支持下本站哦!!!^_^