[quote user="iyeru42" post="86733"]But DoubleJ, if he has used <HEAD> tags anywhere in his skinning system BEFORE this function/file, then the "Fatal Error: Headers have already been sent by index.php on line ##" Will occur. I'm not referencing to phpBB skinning, I mean the site he uses, IE: index.htm or whatever his wrapper is.[/quote]
Even then, the function you mentioned will not download or upload anything to your own computer.
In order to force a download of a .txt file rather then displaying it in the browser, you need to send a header.
Do note that <head> is not the only thing, if you echo anycontent at all, this also includes errors, then headers will fail as that is also content send to the browser.
In order to force a download you need to let the browser know it is a download and this is done with the header() function.
And reading the question, you are being redirected to this .txt file or the page which generates the .txt file so header() function is appropriate here.