Ver Mensaje Individual
  #6 (permalink)  
Antiguo 08/09/2005, 15:49
zsamer
 
Fecha de Ingreso: noviembre-2003
Mensajes: 798
Antigüedad: 20 años, 4 meses
Puntos: 8
alguna idea, solo generar el excel y enviar sin guardarlo en el servidor.

Algo parecido a éste escript:
Código PHP:
<?php
$rpedidos
=mysql_query("select * from pedidos"); 
$shtml="<table>"
$shtml=$shtml."<tr>"
$shtml=$shtml."<td>Periodo</td><td>Codigo_cta</td><td>cat11</td>"
$shtml=$shtml."</tr>";*/ 
while (
$reg mysql_fetch_array($rpedidos)) { 
    
$shtml $shtml.$reg["periodo"].",".$reg["cod_cta"].",".$reg["cat11"]."\n"
}  
$shtml=$shtml."</table>"
header("Content-Description: File Transfer"); 
header("Content-Type: application/force-download"); 
header("Content-Disposition: attachment; filename=pedidos.csv"); 
echo 
$shtml
?>
pero en vez de que se habra o ejecute (con el echo ), se envie como adjunto con phpmailer (ya tengo el script de enviar el adjunto con phpmailer)


gracias