Re: Re: Reset STDIN pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 03 Nov 2005 19:51:05 +1300, Jasper Bryant-Greene wrote:

> On Wed, 2005-11-02 at 21:58 +0000, Curt Zirzow wrote:
>> On Wed, 02 Nov 2005 15:20:46 -0500, John Nichel wrote:
>> 
>> > There has to be a way to do this....reset the internal STDIN pointer
>> > to the begining but I'll be damned if I can find it.
>> > 
>> > reset ( STDIN );
>> > 
>> > returns an error.
>> 
>> The internal STDIN pointer? there is no such thing by the name of STDIN
>> in php.
> 
> Yes there is, when running in CLI mode. See:
> 
> http://php.net/features.commandline#AEN7906

It also exists in apache's sapi (perhaps in other server sapi's).  The
keyword STDIN simply doesn't exist.

And as my other followup says, it makes no sense to rewind php://stdin,
since once stdin is read the buffer is lost, and the pointer is at the
beginning of the empty buffer.

I'm guessing that what is really needed is http://php.net/ncurses, the
ability to read char's as they are typed.

Curt.
-- 
http://news.zirzow.dyndns.org/

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux