
06/02/2012, 21:17
|
| | Fecha de Ingreso: enero-2009
Mensajes: 178
Antigüedad: 16 años, 2 meses Puntos: 2 | |
Respuesta: Generar archivo txt a partir de pagina php <?php
$filecontent="Aqui va el mensaje de texto ... ";
$downloadfile="nombre.txt";
header("Content-disposition: attachment; filename=$downloadfile");
header("Content-Type: application/force-download");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".strlen($filecontent));
header("Pragma: no-cache");
header("Expires: 0");
?> |