Forcing a download using PHP
<p>I have PHP issue, I'm trying to force a file download using php</p>

<p>if 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</p>

<pre><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></pre>

<p>readfile and fopen however is disabled on the server for security purposes.</p>

<p>Is there any other way I can do this</p>
