Re: but if i do so, my script won't stop reading... :(
| From: | Marco Weber | Date: | Tue, 27 May 2003 22:44:33 +0000 |
| Subject: | Re: but if i do so, my script won't stop reading... :( | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-149172@lists.php.net to get a copy of this message | ||
hi
> It is the stdin of the script, you can open that file handle with fopen(
> "stdin", "r" ); i believe
i also thought so, but there is a big problem:
the script runs in an infinite loop... :(
that's my piece of code:
$message='';
$input=fopen('php://stdin', 'r');
while(!feof($input)) $message.=fgets($input, 4096);
fclose($input);
...but the condition in the while loop never gets true... :(
so what can i do?
Thanks in advance
Marco Weber