Of course. See this line?
header('Content-Disposition: inline; filename="' . $reportname . '"');
$reportname is the variable I'm using to hold my filename. For example:
$reportname = "myfile.csv";
Just be careful to get the quote marks right.
Of course, you can always hard-code it as well, but chances are you want some kind of dynamic filename. Mine looks like this:
$reportname = @str_replace(" ", "_", $row['CustomReportName']) . "_" . date("Y_m_d_H_i_s") . "." . $_GET['ft'];
where $_GET['ft'] is the filetype (csv or gz or txt or whatever). And viola, I have a unique filename for my CSV. Spits out something like:
Daily_Averages_2004_08_23_10_45_08.csv
I probably just explained that simple solution in waaaaay too much detail. But it beats doing real work =)