Re: stdin buffering

From: Date: Thu, 09 Sep 2004 19:58:54 +0000
Subject: Re: stdin buffering
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-196251@lists.php.net to get a copy of this message
On Thu, 2004-09-09 at 14:10, Martin Holm wrote: > I'm currently working on some stuff with php-cli and got a few problem. > > I want to be able to read one single character from stdin via keyboard, > ie. pressing a button. > It works fine if I use enter as newline afterwards, but I would like to > do it without pressing enter. > Thus, I have to turn off buffering in the input stream but I can't find > any way to do it. > > Been looking everywhere on php.net but can't find any hints. I have never been able to find a way to disable STDIN buffering in PHP. You may find ncurses_getch() of use however. http://www.php.net/ncurses_getch -- Greg Donald

« previous php.general (#196251) next »