ファイルをダウンロードさせたいときは読み込んで、ファイル名を指定してヘッダ付きではき出す。 ただしサイズが大きいとブラウザ側でタイムアウトしてしまう可能性があるので注意が必要。
$file="log.csv"; header ("Content-Disposition: attachment; filename=$file"); header ("Content-type: application/x-csv"); readfile ($file);