Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/11/2011, 19:01
gato06
 
Fecha de Ingreso: noviembre-2011
Mensajes: 6
Antigüedad: 12 años, 5 meses
Puntos: 2
Respuesta: Descarga de archivos en PHP

Puedes usar este codigo basico

$rutafile = "user/";
$nombre = $_POST['archivo'];
$enlace = $rutafile."/".$nombre;
header ("Content-Disposition: attachment; filename=".$nombre."\n\n");
header ("Content-Type: application/octet-stream");
header ("Content-Length: ".filesize($enlace));
readfile($enlace);