Ver Mensaje Individual
  #2 (permalink)  
Antiguo 02/09/2013, 07:06
Avatar de Patriarka
Patriarka
 
Fecha de Ingreso: enero-2011
Ubicación: Moreno, Buenos Aires, Argentina
Mensajes: 2.851
Antigüedad: 13 años, 2 meses
Puntos: 288
Respuesta: Force download a archivos

hola amigo, yo lo haria asi
Código PHP:
Ver original
  1. <?
  2. header("Pragma: public");
  3. header("Expires: 0");
  4. header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
  5.  
  6. header("content-Type: application/force-download");
  7. header("Content-type: application/octet-stream");
  8. header("content-Type: application/download");
  9.  
  10. header("Content-disposition:  attachment; filename={$path}"); //$path debe ser la ruta absoluta al file
  11. header("content-Transfer-Encoding: binary");
  12. ?>