Try sending a control d to signify EOF, because fread will only read to end
of file.  But I wouldn't do 255 because you might want to enter more.  Maybe
stick a while !EOF in there.

> -----Original Message-----
> From: John Nichel [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 01, 2003 6:01 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Command line php
>
>
> I did that orginally, but it waits for me to enter 255 characters before
> closing the fread....no matter how many times I hit enter.
>
> > Benny Pedersen wrote:
> >
> >> On Wednesday 02 April 2003 03:17, John Nichel wrote:
> >>
> >>> if I do a...
> >>> $name = fread ( STDIN, sizeof ( STDIN ) );
> >>
> >>
> >>
> >>  $name = fread ( STDIN, 255 );
> >>
> >> tryit :)
> >>
> >>
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to