Ver Mensaje Individual
  #4 (permalink)  
Antiguo 11/12/2009, 16:50
Diegotopet
Invitado
 
Mensajes: n/a
Puntos:
Exclamación Respuesta: Exportar tabla a CSV

Como, que quede asi?

Código PHP:
<?php
 
include("../../db.php"); // archivo de conexión a base de datos
require 'exportcsv.inc.php';
$table="photo_order"// this is the tablename that you want to export to csv from mysql.
 
exportMysqlToCsv($table);
    
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    
header("Content-Length: " strlen($out));
    
// Output to browser with appropriate mime type, you choose ;)
    
header("Content-type: text/x-csv");
    
//header("Content-type: text/csv");
    //header("Content-type: application/csv");
    
header("Content-Disposition: attachment; filename=$filename");
    echo 
$out;
    exit;
 
?>
Asi no funciona, me sigue saliendo el error.

Última edición por Diegotopet; 11/12/2009 a las 16:51 Razón: no funciono asi.