Ver Mensaje Individual
  #3 (permalink)  
Antiguo 22/04/2002, 14:08
fmatias
 
Fecha de Ingreso: abril-2002
Mensajes: 2
Antigüedad: 22 años
Puntos: 0
Re: Descargar consulta a fichero.

Gracias Cluster, con tu sugerencia y viendo un poco el código de phpmyadmin y phpnuke, tengo lo básico para empezar, dejo una muestra, a partir de aquí lo que falta es crear las consultas.
Cita:
<?php

$strfichero = "Catálogo PcLandia";
$strhecho = "Generado el";
$stra = "a las";
$fecha_hora = date ("d-m-Y");

header("Content-disposition: filename=$strfichero $dbname $fecha_hora.txt");
header("Content-type: application/octetstream");
header("Pragma: no-cache");
header("Expires: 0");

// doing some DOS-CRLF magic...
$client = getenv("HTTP_USER_AGENT");
if(ereg('[^(]*\((.*)\)[^)]*',$client,$regs))
{
$os = $regs[1];
// Mejor bajo Winx
if (eregi("Win",$os))
$crlf="\r\n";
}

$strhora = date ("H:i");
print "# ================================================== ======$crlf";
print "#$crlf";
print "# $strfichero $crlf";
print "# $strhecho $fecha_hora $stra $strhora $crlf";
print "#$crlf";
print "# http://www.pclandia.com/tienda$crlf";
print "# ================================================== ======$crlf";
print "$crlf";

?>
Saludos y gracias.