header("Content-type: command");
header("Content-Disposition: attachment; filename=test");
echo $output;其中command可以参考php的header函数的介绍
header("Content-Disposition: attachment; filename=test");
echo $output;其中command可以参考php的header函数的介绍
//写入文件
function writetofile($file_name, $data, $method = "w")
{
$filenum = fopen($file_name, $method);
flock($filenum, LOCK_EX);
$file_data = fwrite($filenum,$data);
fclose($filenum);
return $file_data;
}