你好需要下载生成的csv文件,我在代码下面使用,但在服务器上我无法下载csv文件。同样的代码在我的本地系统中工作得很好,但不能在实时服务器上工作。
<?php
function downloadFile($filename,$filepath)
{
header("Content-type: text/csv"); // instead of pdf use others... for text
header("Content-disposition: attachment; filename=".$filename);
readfile($filepath);
}
?>
检查您的服务器,可能是空间有限