PHP File unreadable after being downloaded
- by Drew
Hi I have a script that creates a file and stores it on the server. The file is encoded in UTF-8 and is a kind of xml file for the cmap software.
If i open the file directly from the server then there is no problem and the file can be read.
I am forcing a download of this file when a user goes to a specific url. After such a download, the file is unreadable by the cmap software. I have to go into my text editor (notepad++) and change the encoding from UTF-8 to UTF-8 without BOM.
Am I sending the wrong headers? Is php doing something to the file when it is downloading it?
Any advice on this would really be appreciated.
Cheers
Drew