Tema: De Php a Csv
Ver Mensaje Individual
  #8 (permalink)  
Antiguo 30/10/2012, 23:47
raposu
 
Fecha de Ingreso: enero-2012
Mensajes: 24
Antigüedad: 12 años, 3 meses
Puntos: 1
Respuesta: De Php a Csv

hice algunas pruebas pero sin exito tampoco

Código:
<?php
//CONSULTA
include("oviedo.php"); // Conexion a nuestra BD
while ($reg = mysql_fetch_array($sql))
$tutorial = strip_tags($cadena);
$texto = str_replace(array("\n","\r"), "", $texto);
$aguja="<br/>";
$reemplazar="";
$csv = str_replace($aguja, $reemplazar, $texto);
header("Content-Description: File Transfer");
header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=clasi.csv");
echo $shtml; 
?>
y el resultado sigue siendo:

Cita:
Categorias,30/10/2012 07:00,30/10/2012 08:00,30/10/2012 09:00,30/10/2012 10:00,30/10/2012 11:00,30/10/2012 12:00,30/10/2012 13:00,30/10/2012 14:00,30/10/2012 15:00,30/10/2012 16:00,30/10/2012 17:00,30/10/2012 18:00,30/10/2012 19:00,30/10/2012 20:00,30/10/2012 21:00,30/10/2012 22:00,30/10/2012 23:00,31/10/2012 00:00,31/10/2012 01:00,31/10/2012 02:00,31/10/2012 03:00,31/10/2012 04:00,31/10/2012 05:00,31/10/2012 06:00<br/>Precipitacion,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0. 0,0.0,0.0<br/>Temperatura,4.1,4.0,4.6,6.0,9.8,9.9,12.2,13.4,13.0 ,13.5,12.9,11.8,10.9,9.9,9.1,7.9,7.3,6.7,6.2,5.7,5 .2,4.9,4.5,4.2<br/>Presion,965.8,965.2,965.3,965.5,965.4,965.1,964.6, 963.9,963.2,962.8,962.8,962.7,963.0,963.2,963.2,96 3.1,963.1,962.5,962.3,962.0,961.8,961.5,961.4,961. 0
Te recuerdo que este "quote" cambia cada hora $texto="cambia casa hora<br/>este es otro texto";

Última edición por raposu; 31/10/2012 a las 00:32 Razón: aportar más datos