Re: Console Behavior

From: Date: Thu, 31 Oct 2002 15:21:41 +0000
Subject: Re: Console Behavior
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-90380@lists.php.net to get a copy of this message
flush() On 31 Oct 2002, Adam Voigt wrote: > Is this normal? > I have: > > #!/usr/local/php_4.2.3/bin/php -q > <?php > > error_reporting(E_ALL); > > echo "\n\nAttach code? > "; > > $f = fopen("php://stdin","r"); > $data = fread($f,5); > fclose($f); > > echo "\n\n$data\n\n"; > > ?> > > And it refuses to echo "Attach code?" until after > I hit 5 keys on the console and hit enter, when infact > it is supposed to be a prompt for the 5 keys (ie, > display before you enter the keys) Is this expected? > If yes, any workaround?. > > Adam Voigt > adam.voigt@cryptocomm.com > > > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.dev (#90380) next »