Ver Mensaje Individual
  #4 (permalink)  
Antiguo 23/06/2011, 13:14
dksoft
 
Fecha de Ingreso: octubre-2010
Mensajes: 123
Antigüedad: 13 años, 6 meses
Puntos: 10
Respuesta: Problema al descargar un TXT

bueno .. pense que con el codigo de arriba podrian decirmee peroo bueno se los muestro

Código PHP:
$query query("SELECT pid,asunto,nombre,fecha,area,action,mensaje,localidad,telefono FROM peticiones ".$kery." ORDER BY area,pid",__FILE__,__LINE__);
header("Content-Type: plain/text");
header("Content-Disposition: attachment; filename=\"TXT-".date("d-m-y")."_".rand(1,9).".txt\"");
while(
$item mysql_fetch_assoc($query)) {
foreach(
$item as $key => $value) { $item[$key] = utf8_decode(html_entity_decode($value)); }
$item["fecha"] = date("d/m/Y"$item["fecha"]);
$item["area"] = $CONFIG["area"][$item["area"]];
$item["action"] = $CONFIG["options"][$item["action"]];
echo
"
---------------------------------------------------
Peticion #"
.$item["pid"]."
Nombre: "
.$item["nombre"]."
Asunto: "
.$item["asunto"]."
Area: "
.$item["area"]."
Revision: "
.$item["action"]."
Telefono: "
.$item["telefono"]."
Localiadd: "
.$item["localidad"]."
Mensaje:
"
.$item["mensaje"]."
---------------------------------------------------
"
;