Hi,
I have a working php page that hides a real location of a pdf file and then sends it to the visitor. Now i want to do this with a xls or csv file
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="document.pdf"');
readfile('real_file_location/file.pdf');
I tried this with all kinds of tricks i found on the net but didn’t find a working solution
header('Content-type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename="document.xls"');
readfile('real_file_location/file.xls');