note 10567 added to readline
| From: | julien at cutiservices dot com | Date: | Thu, 11 Jan 2001 03:57:54 +0000 |
| Subject: | note 10567 added to readline | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-9635@lists.php.net to get a copy of this message | ||
apparently, i havent enough read the langage manual because in can't stop rewrite functions,
i wrote a readline() similar one a week ago without knowing existence of readline():
(i post that now cause i think it would be usefull for php version under 4b4)
function readline($prompt)
{
echo $prompt;
flush();
exec("read var\necho \$var",output);
return($output[0]);
}
example:
$hostname = readline("please enter your hostname: ");
echo "hostname is $hostname\n";
have a nice day :)
http://www.php.net/manual/function.readline.php