Ver Mensaje Individual
  #7 (permalink)  
Antiguo 17/04/2016, 11:48
xerifandtomas
 
Fecha de Ingreso: octubre-2010
Ubicación: España
Mensajes: 1.007
Antigüedad: 13 años, 6 meses
Puntos: 123
Respuesta: exportar a archivo.txt desde php

Pues creo que aquí mismo tienes un ejemplo completo de como hacerlo

Código PHP:
Ver original
  1. $filecontent="Aqui va el mensaje de texto ... ";
  2. $downloadfile="nombre.txt";
  3.  
  4. header("Content-disposition: attachment; filename=$downloadfile");
  5. header("Content-Type: application/force-download");
  6. header("Content-Transfer-Encoding: binary");
  7. header("Content-Length: ".strlen($filecontent));
  8. header("Pragma: no-cache");
  9. header("Expires: 0");
  10.  
  11. echo $filecontent;

Y por favor no reabras temas antiguos, crea un tema nuevo y pon una referencia al tema antiguo si es necesario.
__________________
Unset($vida['malRollo']);