I have a big problem when I want to download on my smart phone a xls file generated by PHPExcel it me download a php file named my page, while on my pc it load properly.
header('Content-type: application/vnd.ms-excel'); header('Content-Disposition:inline;filename=fichie.xls'); $writer->save('php://output'); exit();
There's two problems with your line that sets the content disposition.
It should have spaces between the words, which is a standard requirement for headers.
It should be attachment
if you want the file to download, as opposed to display inline.
eg
header('Content-Disposition: attachment; filename=fichie.xls');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.