这是我的文件下载脚本
问题是,当下载文件时让我们说文件名是音乐,文件名更改为
_var_www_myporject_module_Application_musicdir_music
我不想要的
这是我的代码片段
public function downloadAction() {
    $filename = $this->params()->fromQuery('filename');
    $file = "/var/www/myproject/module/Application/musicDir/$filename";
    if ($file) {
        header("Cache-Control: public");
        header("Content-Description: File Download");
        header("Content-Disposition: attachment;filename = $file");
        header("Content-Type: application/octet-stream");
        header("Content-Transfer-Encoding: binary");
        readfile($file);
        exit;
    } else {
        exit;
    }
}