PHP Headers for Sending CSV File Downloads
If you would like to force a file download prompt to the user, instead of just outputting the text to the browser, use the following headers. ...
Written by Sean Behan on 11/25/2017