localUpdater.php 719 B

123456789101112131415161718192021222324
  1. <?php
  2. /*
  3. * To change this license header, choose License Headers in Project Properties.
  4. * To change this template file, choose Tools | Templates
  5. * and open the template in the editor.
  6. */
  7. $file = 'timekeeperLocal.php';
  8. if (file_exists($file)) {
  9. header('Content-Description: File Transfer');
  10. header('Content-Type: application/octet-stream');
  11. header('Content-Disposition: attachment; filename='.basename($file));
  12. header('Content-Transfer-Encoding: binary');
  13. header('Expires: 0');
  14. header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
  15. header('Pragma: public');
  16. header('Content-Length: ' . filesize($file));
  17. ob_clean();
  18. flush();
  19. readfile($file);
  20. exit;
  21. }