Forcing a download using PHP

skytmerawal

New Member
I have PHP issue, I'm trying to force a file download using phpif users click on my link www.site.com/download.php it redirects them to download.php with the following code inside the download.php file\[code\] header('Content-Type: application/csv'); header('Content-Disposition: attachment; filename=custom_report.csv'); header('Pragma: no-cache'); echo readfile('files/csv/custom_report.csv');\[/code\]readfile and fopen however is disabled on the server for security purposes.Is there any other way I can do this
 
Back
Top