php 下载文本文件
file_put_contents(ROOT_PATH . '/' . 'goods_sn.txt',$goods_id);
$yourfile="goods_sn.txt";
header ("Content-Type: application/download");
header ("Content-Disposition: attachment; filename=$yourfile");
header("Content-Length: " . filesize("$yourfile"));
$fp = fopen("$yourfile", "r");
fpassthru($fp);
随心网络科技 :联系QQ:1595192997