在我的系统中,我已获取所有数据并导出到 txt 文件中。
$str_res_exp = $this->export_res($column ,$res_data,$column_length);
header("Content-type: plain/text");
header("Content-Disposition: attachment; filename=".$_POST['txt_name'].".txt");
header("Pragma: no-cache");
header("Expires: 0");
echo $str_res_exp;
exit;
它显示数据,但在第一行,第一个字符填充空白...
出于安全原因,我无法发布更多代码。
最佳答案
关于PHP 头文件问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6531104/