我有一个控制器:-
function game_file($filename)
    {      
        $file_path = base_url()."resources/games_application/$filename";
        header('Content-Type: application/octet-stream');
        header("Content-Disposition: attachment; filename=$filename");
        ob_clean();
        flush();
        readfile($file_path);
        redirect('downloads');  //This is not working 
    }
我的观点是:-
<a href='".base_url()."downloads/game_file/".$games_data['file_name']."'>Download<a/>
我可以下载文件,但问题是下载后我想重定向到download控制器。这只会下载我的文件,但下载完成后不会重定向。我做错了什么吗?
编辑:-我知道我无法重定向,因为标头已经发送,所以任何人都可以帮我解决这个问题吗?