下载我有PHP的问题,我试图迫使文件下载使用PHP强制使用PHP
如果我的用户点击链接www.site.com/download.php它重定向他们的download.php在download.php文件中使用以下代码
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename=custom_report.csv');
header('Pragma: no-cache');
echo readfile('files/csv/custom_report.csv');
但是,为了安全起见,在服务器上禁用了readfile和fopen。
有没有其他办法,我可以做到这一点
你确定他们不仅仅是禁用远程访问,如http:// ...? – 2010-01-07 15:05:51
我也试过这样做Download Report (csv file format)仍然失败 – Roland 2010-01-07 15:08:31