para_bellum

php Download file

Apr 30th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. <?php
  2. $mat = $_GET["matricule"];
  3. $file_url = "testfile_".$mat.".txt";
  4. header('Content-Type: application/octet-stream');
  5. header("Content-Transfer-Encoding: Binary");
  6. header("Content-disposition: attachment; filename=\"" . basename($file_url) . "\"");
  7. readfile($file_url);
  8. ?>
Add Comment
Please, Sign In to add comment