Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // @Author: [iPs]SuYaNw
- function ForceDownloadFile($arquivo)
- {
- if(!file_exists($arquivo)) return false;
- $tipo = strstr($arquivo,'.');
- header("Content-Type: ".$tipo);
- header("Content-Length: ".filesize($arquivo));
- header("Content-Disposition: attachment; filename=".basename($arquivo));
- readfile($arquivo);
- }
- ?>
Add Comment
Please, Sign In to add comment