Note that this won't work for IE - it will still display the text. This, however, does seem to work for IE:
$Filename="blah.txt";
$Content="hello there";
header("Content-Type: text/plain");
header("Content-Disposition: attachment; filename=$Filename");
echo $Content;
exit();
EDIT: Alternatively, I also found a server-side workaround posted in a blog.