Este proyecto te permite crear archivos csv desde la base de datos con la función INTO OUTFILE de sql,
ademas agrega los encabezados de columna de manera dinámica, solo configura las variables iniciales y obtén tu csv.
$fecha_hoy=date('d-m-Y');
$ruta_descarga = 'C:/Program Files/Apache24/htdocs/CsvIgniter/tmp/';//no olvides el / del final
$nombre_carpeta_a_descargar = 'FOLDER1';
$descarga_nav = TRUE; //ESTO HABILITA O DESHABILITA LA DESCARGA
$bd = "tu_base_de_datos";
$tabla = "tu_tabla";
//WHERE
$wheres = "";
$prefijo_reportes_archivos = "CSV Sample 1 - Title ";
$momento = "{$fecha_hoy}";//date("Y-m-d h-i-s"); //AQUI PUEDES AGREGAR MAS DETALLES DE LA HORA
$registros_por_csv = 1000000; //reducir si el archivo se corrompe
$delimiter = ',';
$enclosure = '"';
$newline = '\n';
Features
- Genera csv dinámicos fácil
Follow CsvIgniter
User Reviews
-
Aver q pasa ... Veremos