I have written PHP code to export data to a file .csv. The exported file .csvcould be downloaded to my PC. But on the client server the file was .csvnot downloadable, it was in a readable format (the browser can read and print the contents of the file as a file .html).
I used header()before accessing the file .csv.
Is this a server side problem or do I need to change the code?
source
share