On 11/1/06, Stephen Weeks <[EMAIL PROTECTED]> wrote:
Chris Carey wrote:

> if(!defined("STDIN")) define("STDIN", fopen('php://stdin','r'));
> $input = split("\n", fread(STDIN, 8192)); // PHP has a limit of 8192
> bytes on fread :(

Not all PHP installs have a STDIN file descriptor defined?


Dunno. In true php fashion, I stole that code from some code snippet
on the Internet without actually reading the language spec.

$input = split("\n", fread(fopen('php://stdin','r'), 8192));

...accomplishes the same thing.

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to