Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- header('Content-Type: application/vnd.ms-excel'); //define header info for browser
- header('Content-Disposition: attachment;
- filename='.$dbTable.'-'.date('Ymd').'.xls');
- header('Pragma: no-cache');
- header('Expires: 0');
- header("Content-Type: application/vnd.ms-excel; charset=UTF-8");
- header("Content-Disposition: inline; filename="" . $dbTable.'-'.date('Ymd') . ".xls"");
- header("Pragma: no-cache");
- header("Expires: 0");
- header("Location: http://path/to/file/filename.xlsx");
- /* Make sure that code below does not get executed when we redirect. */
- exit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement