Ver Mensaje Individual
  #3 (permalink)  
Antiguo 26/03/2012, 15:45
marcoss2009
 
Fecha de Ingreso: agosto-2011
Ubicación: Argentina
Mensajes: 46
Antigüedad: 12 años, 8 meses
Puntos: 0
Respuesta: hacer que se descargue el archivo con href

Cita:
Iniciado por Rasec101 Ver Mensaje
echale un vistas a esto ojala te sirba [url]http://www.forosdelweb.com/f18/descarga-archivos-php-957314/[/url]
Código PHP:
Ver original
  1. <?php
  2. $rutafile = "RUTA_DE_TU_ARCHIVO";
  3. $nombre = $_GET['nombre_archivo'];
  4. $enlace = $rutafile."/".$nombre;
  5. header ("Content-Disposition: attachment; filename=".$nombre."\n\n");
  6. header ("Content-Type: application/octet-stream");
  7. header ("Content-Length: ".filesize($enlace));
  8. readfile($enlace);
  9.  
  10. ?>
muchas gracias, me sirvio