![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
11/11/2011, 19:01
|
| | Fecha de Ingreso: noviembre-2011
Mensajes: 6
Antigüedad: 13 años, 2 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); |