I'm trying to get an excel file to download, I don't want to generate or edit it in anyway, just download it as it stands on the server.
I have no problem with PDFs using the following method;
Code: Select all
header('Content-disposition: attachment; filename='.$filename);
header('Content-type: application/pdf');
readfile('secureitems/'.$filename);
I'm getting a document with the name of the requested document but it's empty, apart from cell A1 witch contains to file name? I'm very confused.
Any help would be great!