Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- CLI keyboard input not working in Windows XP
October 10, 2007, 7:39 pm
rate this thread
version of PHP on Windows XP SP2, and none of them seem to work. And I
can't find any info about it anywhere. (as in how or why except the
standard stuff) So I don't know if it is a problem with my system, or
PHP, or keyboard input using PHP CLI under Windows (XP), or what.
php -v gives:
PHP 5.1.6 (cli) (built: Aug 23 2006 16:35:53)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
Theoretically, this line should work:
$text = fgets (STDIN, 1024);
It does prompt and allow input, but it doesn't return anything.
Even if I open the stream using fopen ("php://stdin", "r") and try to
read from that it doesn't work.
Any ideas or suggestions?