gt; Should be:
> >> Kelly Barrett> if ($variable == trim($line_text)) {
> >>
> >> Kelly Barrett> Otherwise you are doing an assignment, which will
> >> always be true.
> >>
> >> Kelly Barrett> Finally, your while loop should pr
gt; Kelly Barrett> Because fgets returns EOF at the end of a file,
>> not necessarily false (I
>> Kelly Barrett> THINK EOF currently is false, though theoretically
>> EOF could change to any
>> Kelly Barrett> value).
>>
>> Kelly Barrett> Cheers,
>&
fd) == false) {
> Kelly Barrett> $line_text = fgets($fd, 2048);
>
> Kelly Barrett> Because fgets returns EOF at the end of a file,
> not necessarily false (I
> Kelly Barrett> THINK EOF currently is false, though theoretically
> EOF could change to any
> Kelly Barret
lly Barrett> Kelly.
>> -Original Message-
>> From: Richard Kurth [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, 10 September 2001 5:12 PM
>> To: php
>> Subject: [PHP] Searching for text in a file
>>
>>
>> I am having a problem with sear
gh theoretically EOF could change to any
value).
Cheers,
Kelly.
> -Original Message-
> From: Richard Kurth [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 10 September 2001 5:12 PM
> To: php
> Subject: [PHP] Searching for text in a file
>
>
> I am having a problem with sea
On Mon, 10 Sep 2001 16:41, Richard Kurth wrote:
> I am having a problem with searching through a file for a curtain
> text. Like the text below [EMAIL PROTECTED] does not exists in the file
> but when I run this it gives me a Match at line number.
> I need to run three or four names at a
I am having a problem with searching through a file for a curtain
text. Like the text below [EMAIL PROTECTED] does not exists in the file
but when I run this it gives me a Match at line number.
I need to run three or four names at a time through this script
to see if they are already t
7 matches
Mail list logo