From: [EMAIL PROTECTED] Operating system: Windows 2000 PHP version: 4.0.6 PHP Bug Type: Scripting Engine problem Bug description: fgetc from php://stdin doesn't return after one byte typed
<? $rtdin = fopen("php://stdin", "r"); for(;;){ $c = fgetc($rtdin); fflush($rtdin); if ($c == 'q') break; else echo "you pressed:" . $c . "\n"; } ?> ========= This script doesn't work as expected: fgetc doesn't return until "\n" is read from stdin. How can I catch single key-presses from the keyboard? -- Edit bug report at: http://bugs.php.net/?id=14003&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]