Re: Command line php

From: Date: Wed, 02 Apr 2003 02:06:05 +0000
Subject: Re: Command line php
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-141912@lists.php.net to get a copy of this message
Duh..... fgets, not fread.... echo ( "What is your name?\n" ); $name = fgets ( STDIN ); echo ( "Hello, " . $name ); John Nichel wrote:
I did that orginally, but it waits for me to enter 255 characters before closing the fread....no matter how many times I hit enter.
Benny Pedersen wrote:
On Wednesday 02 April 2003 03:17, John Nichel wrote:
if I do a... $name = fread ( STDIN, sizeof ( STDIN ) );
$name = fread ( STDIN, 255 ); tryit :)


« previous php.general (#141912) next »