Re: Sobre ficheros TXT
| From: | Adrian | Date: | Mon, 07 Feb 2000 01:31:24 +0000 |
| Subject: | Re: Sobre ficheros TXT | ||
| References: | 1 2 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-33581@lists.php.net to get a copy of this message | ||
A mi me pasa algo parecido y no lo he podido solucionar ni con \r\n.
----- Original Message -----
From: "Aldo Quezada V." <aquezada@bsp-inspector.cl>
To: <lista@phpes.com>
Sent: Tuesday, March 11, 2003 8:15 AM
Subject: Re: [PHP-ES] Sobre ficheros TXT
> Pon \r\n
>
>
>
>
> At 11:00 11-03-2003 -0500, you wrote:
> >Hola amigos:
> >
> >Estoy usando un scrip que se envio en la lista hace ya varios meses ylo
> >estoy utilizando, es el de crear ficheros .doc y .xml y me funciona
> >perfectamente.
> >Este script consiste en crear ficgheros a travez de una consulta,
> >dependiendo del tipo de file que se quiere y cuando se ejecuta, el saca
la
> >ventanita de hacer el download del fichero, cuando se baja trabaja
> >perfectamente. Ahora lo que quiero hacer es eso mismo pero con un fichero
> >TXT. Lo hice y funciona perfectamente, pero cuando le doy "\n" para crear
> >una linea nueva no me funciona, me pone todo el texto junto, probe con
"\t"
> >y si me deja los espacios, pero el "\n" No me quiere funcionar.
> >Aqui les va el codigo donde lo hago, ya he probado varias opciones que
veran
> >estan comentariadas.
> >
> >Espero me puedan ayudar
> >
> >remy
> >
> > while($row = mysql_fetch_row($result))
> > {
> > file://set_time_limit(60); // HaRa
> > $schema_insert = "";
> > for($j=0; $j<mysql_num_fields($result);$j++)
> > {
> > file://define field names
> > $field_name = mysql_field_name($result,$j);
> > file://will show name of fields
> > // $schema_insert .= "$field_name:\t";
> > if(!isset($row[$j])) {
> > $schema_insert .= "NULL";
> > }
> > elseif ($row[$j] != "") {
> > $schema_insert .= "$row[$j]";
> > // echo "\n";
> > // $schema_insert .= "\n";
> > }
> > else {
> > $schema_insert .= "";
> > }
> > }
> > $schema_insert = str_replace($sep."$", "", $schema_insert);
> > // $schema_insert .= "\n";
> > print(trim($schema_insert));
> > file://end of each mysql row
> > file://creates line to separate data from each MySQL table row
> > print "\n";
> > $i++;
> >}
> >}
> >
> >
> >
> >---------------------------------------------------------------------
> >Archivo On-line: http://www.phpes.com/
> > via news: news://news.phpes.com/
> >Manual PHP en español: http://www.php.net/manual/es/
> >Para dar de baja la suscripción, mande un mensaje a:
> > lista-unsubscribe@phpes.com
>
> Aldo Quezada V.
> JTIC / BSP-Inspector
> Fono : 946 25 74
> 946 25 75
> http://www.bsp-inspector.cl
>
>
>
>
> ---------------------------------------------------------------------
> Archivo On-line: http://www.phpes.com/
> via news: news://news.phpes.com/
> Manual PHP en español: http://www.php.net/manual/es/
> Para dar de baja la suscripción, mande un mensaje a:
> lista-unsubscribe@phpes.com
>