Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $file = $_POST['file'];
- if ((isset($file))&&(file_exists($file))) {
- header("Content-type: application/force-download");
- header('Content-Disposition: inline; filename="' . $file . '"');
- header("Content-Transfer-Encoding: Binary");
- header("Content-length: ".filesize($file));
- header('Content-Type: application/octet-stream');
- header('Content-Disposition: attachment; filename="' . $file . '"');
- readfile("$file");
- } else {
- echo '<h1>No file selected or file does not exist ' . $_POST['file'] . '</h1><a href="index.php">Click here to go back</a>';
- } //end if
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement