Problem naming the download file
<p>I have some php code which is suppose to download a zip file...this code is called from a file called <strong>download_file.php</strong> (very original, i know)</p>

<p>The relevant function is as follows :</p>

<pre><code>function download_clientfile() {
    if ($this-&gt;download_file === FALSE) {
        $this-&gt;log-&gt;log(sprintf("The download file was not generated."), PEAR_LOG_CRIT);
        return;
    }

    $fsize = filesize($this-&gt;download_file);
    $path_parts = pathinfo($this-&gt;download_file);
    $ext = strtolower($path_parts["extension"]);

    header('Content-Description: File Transfer');
    header('Content-Type: application/octet-stream');
    header('Content-Disposition: attachment; file='.$path_parts['basename']);
    header('Content-Transfer-Encoding: binary');
    header('Expires:0');
    header("Cache-control: must-revalidate, post-check=0, pre-check=0");
    header('Pragma: public');
    header('Content-Length: '.filesize($this-&gt;download_file));
    ob_clean();
    flush();
    readfile($this-&gt;download_file);
    exit;
</code></pre>

<p>}</p>

<hr>

<p>Problem : The file downloaded is the zip file that is expected, however its downloaded with the name 'download_file.php'</p>

<p>Any suggestions on how I can get it to download by the name of the zip file.
Thanks</p>
