-1
Good afternoon, I have a script where generates an excel spreadsheet with information, but after the exchange of the server started to give problem, before it generated and downloaded normally but now just saved in the server the file perfectly. But instead of downloading the file opens a page with coding defects. follows below the part of the code that should bring the download.
header('Content-Type: application/vnd.ms-excel'); //mime type
header('Content-Disposition: attachment;filename="'.$filename.'"'); //tell browser what's the file name
header('Cache-Control: max-age=0'); //no cache
readfile("download/".$filename);
exit();
I tested the way it’s all white on the page.
– Noscin