PHP downloading excel file becomes corrupt
I have an excel file that i want a user to be able to download from my server. I have looked at a lot of questions on here but i cannot find a way to correctly download the file w/o corruption. I am assuming it is the headers but i haven't had a working combination of them yet. This is what i have right now and in the corrupt file that i receive i can see the column names of the spreadsheet i want but its all messed up. $filename = '/var/www/web1/web/public/temporary/Spreadsheet.xls'; header("Content-type: application/octet-stream"); header("Content-type: application/vnd-ms-excel"); header(