note 43975 added to features.commandline
| From: | Vincent at rn2 dot php dot net | Date: | Sat, 10 Jul 2004 19:19:23 +0000 |
| Subject: | note 43975 added to features.commandline | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-73014@lists.php.net to get a copy of this message | ||
A few quick functions for easy reading and writing with the command line.
<?php
function read($len = 256) { // read the user input
return str_replace(array("\r","\n"),"",fgets(STDIN,$len));
}
function write($txt) { // write to the command line
fwrite(STDOUT,$txt);
}
?>
----
Manual Page -- http://www.php.net/manual/en/features.commandline.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43975
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43975&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43975&report=yes
Search -- http://master.php.net/manage/user-notes.php