Advertisement
Guest User

Untitled

a guest
Apr 21st, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. header('Content-Type: application/vnd.ms-excel'); //define header info for browser
  2. header('Content-Disposition: attachment;
  3. filename='.$dbTable.'-'.date('Ymd').'.xls');
  4. header('Pragma: no-cache');
  5. header('Expires: 0');
  6.  
  7. header("Content-Type: application/vnd.ms-excel; charset=UTF-8");
  8. header("Content-Disposition: inline; filename="" . $dbTable.'-'.date('Ymd') . ".xls"");
  9. header("Pragma: no-cache");
  10. header("Expires: 0");
  11.  
  12. header("Location: http://path/to/file/filename.xlsx");
  13. /* Make sure that code below does not get executed when we redirect. */
  14. exit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement