(not tested)

$fd = fopen("php://stdin", "r");
while( !feof($fd) ) {
        $line = fgets($fd, 8192);
        ....
}

fclose($fd);

On Mon, 4 Mar 2002, Ken Tossell wrote:

> How would you read a multi-line stdin in php? The scripts I see all break
> after one line.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to