ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-spanish
php-spanish
Re: [PHP-ES] Saltode linea
by Lte.Daniel Minacori other posts by this author
Sep 30 2005 3:35PM messages near this date
Re: [PHP-ES] Saltode linea | Re: [PHP-ES] Saltode linea
Si, aun mejor. Cree una sola variable a la que le paso los datos que 
necesito con \r\n al final y listo.!

Gracias denuevo.


Tambien fijate si esto funciona, deberia:

fwrite($fp, $linea1 . "\r\n");

Asi evitar declarar una variable al pedo.

Suerte!
Caco_Patane <!> 

On 9/30/05, Lte.Daniel Minacori <berkanet2000@[...].ar>  wrote:
>  Ok, este es el código (simplificado, sin las variables que realmente debo
>  pasarle)
> 
>  $archivo="/includes/php/datos.txt";
> 
>  $linea1="Primera linea del archivo";
>  $linea2="Segunda linea del archivo";
> 
>  if($fp = fopen($archivo,w)) {
> 
>      fwrite($fp, $linea1);
>      fwrite($fp, $linea2);
> 
>  }
> 
>  Esto escribe las dos variables seguidas. Necesito que vayan una debajo de
>  otra, ya que son parametros que se pasan luego a una impresora fiscal (en
>  argentina se usan).
> 
>  Gracias nuevamente.
> 
>  Daniel,
> 
>  Tambien tene en cuenta que la barra va para el otro lado. En el mail
>  pusiste '/n' y es '\n'.
> 
>  Saludos,
>  Caco_Patane <!>
> 
>  On 9/30/05, Lte.Daniel Minacori <berkanet2000@[...].ar> wrote:
>  > Hola, estoy escribiendo dentro de un archivo con la función fputs($fp,
>  > $variable) y lo hace bien pero, necesito escribir varias lineas dentro 
>  > del
>  > archivo, no consigo hacer una salto de linea... no me anda /n o lo estoy
>  > usando incorrectamente.
>  > necesito que en el archivo quede asi (ejemplo):
>  >
>  > primera linea escrita
>  > segunda linea
>  > tercera
>  > erc.
>  >
>  > pero me escribe:
>  > primera linea escrita segunda linea tercera etc.
>  >
>  > Gracias desde ya!
>  > Daniel.
>  >
>  >
>  >
> 
> 
>  --
>  -----BEGIN GEEK CODE BLOCK-----
>  Version: 3.12
>  GIT dpu s:-- a-- C++ UL+++ P-- L++ E--- W+++ N o-- K- w---
>  O---- M V- PS+++ PE-- Y+ PGP t+ 5-- X+ R+++ tv-- b++ DI-- D++
>  G++ e h+ r-- y**
>  ------END GEEK CODE BLOCK------
> 
> 
> 
> 
> 
> 
>  ___________________________________________________________
>  1GB gratis, Antivirus y Antispam
>  Correo Yahoo!, el mejor correo web del mundo
>  http://correo.yahoo.com.ar
> 
> 
> 


--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT dpu s:-- a-- C++ UL+++ P-- L++ E--- W+++ N o-- K- w---
O---- M V- PS+++ PE-- Y+ PGP t+ 5-- X+ R+++ tv-- b++ DI-- D++
G++ e h+ r-- y**
------END GEEK CODE BLOCK------ 


	

	
		
___________________________________________________________ 
1GB gratis, Antivirus y Antispam 
Correo Yahoo!, el mejor correo web del mundo 
http://correo.yahoo.com.ar 


-- 
PHP Spanish Localization Talk Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Lte.Daniel Minacori
Caco Patane
Lte.Daniel Minacori
Lte.Daniel Minacori
Lte.Daniel Minacori
Caco Patane
Caco Patane
Caco Patane

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved