Forzar Descarga Ficheros en PHP
Una de los problemas más habituales que nos encontramos es el poder forzar la descarga de un determinado fichero desde el navegador del cliente, evitando así que lo abra.
Para ello podemos usar la siguiente función en PHP.
function force_download($file) { if ((isset($file))&&(file_exists($file))) { header("Content-length: ".filesize($file)); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="' . $file . '"'); readfile("$file"); } else { echo "No hay un fichero seleccionado"; } }
Pingback: buying androxal cheap canada
Pingback: buying enclomiphene price for prescription
Pingback: get rifaximin generic south africa
Pingback: saturday delivery xifaxan cod
Pingback: cheapest buy staxyn generic a canada
Pingback: online order avodart buy sydney
Pingback: comment obtenir une prescription de kamagra
Pingback: get dutasteride generic in canada
Pingback: online order flexeril cyclobenzaprine usa discount
Pingback: buying gabapentin retail price
Pingback: canadian online pharmacy itraconazole
Pingback: cheap fildena canada discount
Pingback: kamagra přes noc