|
Posted by Jerry on 07/09/05 19:05
that helped - thanks
<id.at.w98.dot.us@gmail.com> wrote in message
news:1120884661.091885.323830@g49g2000cwa.googlegroups.com...
> if (!empty($buffer))
> fails because the line isn't empty, it contains only a carriage
> return/newline character.
>
> I would change the code to this:
>
> $buffer = fgets($handle, 4096);
> $buffer = str_replace("\n","",$buffer) ; // new code: delete newlines
> $buffer = str_replace("\r","",$buffer) ; // new code: delete carriage
> returns
> if (!empty($buffer))
>
> -id
>
Navigation:
[Reply to this message]
|