Re: Reading unusual stdin
| From: | Philip Hallstrom | Date: | Tue, 05 Mar 2002 01:06:40 +0000 |
| Subject: | Re: Reading unusual stdin | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-87199@lists.php.net to get a copy of this message | ||
(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
>