Guest User

Untitled

a guest
Jul 20th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. <?php
  2.  
  3. header("Cache-control: private");
  4. header('Content-Type: application/octet-stream');
  5. header('Content-Length: '.filesize($vFilePath));
  6. header('Content-Description: File Transfer');
  7. header('Content-Transfer-Encoding: binary');
  8.  
  9. header('Content-Disposition: attachment; filename="'.$downloadName.'"');
  10. readfile($vFilePath);
  11.  
  12. ?>
Add Comment
Please, Sign In to add comment