Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. <?php
  2.  
  3. #echo apache_get_version();
  4.  
  5. file_force_download("C:\\SOFT\\npp.7.6.3.Installer.x64.exe");
  6.  
  7.  
  8. function file_force_download($file) {
  9.     if (file_exists($file)) {
  10.         header('X-SendFile: ' . realpath($file));
  11.         header('Content-Type: application/octet-stream');
  12.         header('Content-Disposition: attachment; filename=' . basename($file));
  13.         exit;
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement