RE: [PHP-WIN] Problemas con las igualdades
| From: | Gryffyn, Trevor | Date: | Tue, 30 Nov 2004 15:36:19 +0000 |
| Subject: | RE: [PHP-WIN] Problemas con las igualdades | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-25088@lists.php.net to get a copy of this message | ||
Sorry, the english link for file() is:
http://us2.php.net/manual/en/function.file.php
> -----Original Message-----
> From: Gryffyn, Trevor
> Sent: Tuesday, November 30, 2004 10:17 AM
> To: php-windows@lists.php.net
> Cc: gquiroga@ecnex.com
> Subject: RE: [PHP-WIN] Problemas con las igualdades
>
>
> Tango:
>
> ---------------------------------------------
>
> En español:
> ¿Usted habla inglés? Mucha gente en esta lista habla
> solamente inglés y ella puede no entender su pregunta. Estoy
> utilizando un software de la traducción (Babelfish) para
> intentar ayudar.
>
> Recomiendo el usar de la función del file() para leer la
> línea del archivo uno a la vez y para analizar la línea para
> ACTIVADO y DESACTIVADO. Puede ser que sea más fácil y puede
> trabajar mejor.
> http://us2.php.net/manual/es/function.file.php
>
> Utilice quizá la función del trim() también.
>
> Siéntase por favor libre escribirme si esta solución no
> trabaja. Puedo intentar ayudar. ¡Buena suerte!
>
> ---------------------------------------------
>
> In English:
> Do you speak english? Many people on this list only speak
> english and they may not understand your question. I am
> using a translation software (Babelfish) to try to help.
>
> I recommend using the file() function to read the file one
> line at a time and parse the line for ACTIVADO and
> DESACTIVADO. It might be easier and may work better.
> http://us2.php.net/manual/es/function.file.php
>
> Maybe use the trim() function also.
>
> Please feel free to write to me if this solution does not
> work. I can try to help.
>
> Good luck!
>
>
> -TG
>
>
> > -----Original Message-----
> > From: T4NG0 [mailto:tango@datayarte.com.ar]
> > Sent: Monday, November 29, 2004 7:39 PM
> > To: php-windows@lists.php.net
> > Subject: [PHP-WIN] Problemas con las igualdades
> >
> >
> > Listeros:
> >
> > estoy tratando de establecer una igualdad y no logro comprender el
> > funcionamiento, el código es el siguiente.
> >
> > dado X archivos en mi directorio cuyo contenido puerde ser
> > "ACTIVADO",
> > "DESACTIVADO" o "NULO".
> >
> > yo debo determinar el contenido de ellos.
> > el problema es que yo logro ver bien el contenido del archivo
> > y lo puedo
> > mostrar sin problemas (esa parte del script no la pastié)
> > pero lo que no
> > puedo hacer es determinar el contenido del archivo (la linea
> > IF $leer ==
> > "ACTIVADO" me da o siempre falso o siempre verdadero pero
> > nunca logro obtener
> > un resultado coherente... ni con = ni con == ni con ===)
> >
> > alguna idea gente ??
> >
> > supongo que dada la hora mis neuronas ya no quieren funcionar
> > y no veo cual es
> > la pavada que me esta deteniendo...
> >
> >
> > for ($x = 40; $x< 154; $x++)
> > {
> > $fp=@fopen("./ws$x",'r');
> > $leer = @fread($fp, 8192);
> >
> > settype($leer, "string");
> >
> > if ($leer=="ACTIVADO")
> > {
> > echo "ACTIVADO";
> > } else {
> > echo "DESACTIVADO";
> > }
> > }
> >
> >
> > gracias y Saludos
> >
> >
> > Gastón.