PHP导出一个txt文本文件

来源:互联网 发布:php 双引号中转义字符 编辑:程序博客网 时间:2024/05/02 04:17

<?php 
Header( "Content-type:   application/octet-stream "); 
Header( "Accept-Ranges:   bytes "); 
header( "Content-Disposition:   attachment;   filename=test.txt "); 
header( "Expires:   0 "); 
header( "Cache-Control:   must-revalidate,   post-check=0,   pre-check=0 "); 
header( "Pragma:   public "); 
echo "测试/r/n";
echo "测试/r/n";

echo 输入的内容为文本文件的内容。
?>

0 0
原创粉丝点击