Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $array = array("12345" => "guarana.jpg");
- $titulo = "Aula 17 - Download de arquivo";
- $idArquivo = $_GET['id'];
- header("Content-type: image/jpeg");
- header("Content-Disposition: attachment; filename=refri.jpg");
- //the image is in the folder arquivos/guarana.jpg
- readfile("../arquivos/".$array[$idArquivo]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement