"Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
> On Mon, Jun 24, 2002 at 02:07:28PM -0700, Michael wrote: > > Are there functions in PHP that will allow me to read in a variable via > > standard input? I just wanted to do something like this: > > http://www.php.net/manual/en/function.fopen.php Perfect! Thank you! Anyway, for anyone else who's interested in the answer and doesn't want to dig through the user contributed notes for fopen.... function read($length='255'){ if (!isset($GLOBALS['StdinPointer'])){ $GLOBALS['StdinPointer']=fopen("php://stdin","r"); } $line=fgets($GLOBALS['StdinPointer'],$length); return trim($line); } Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php