Here is a an extract from some code...
Note that if you want to read more then
one thing from the user, you better not
close STDIN, cause you can only open it once.
Here's the code it may not work without
some fixing... dunno:
-? php
function Readln(&$INPUT){
// $fp = fopen("php://stdin
I haven't tried this personally, but according to
http://www.php.net/manual/en/function.fopen.php
you can open the standard streams as php://stdin and php://stdout, which
should allow you to read and write to the user directly.
- Tim
On Mon, 2001-08-20 at 12:14, Bill Brigden wrote:
> Hi all,
#!/path/to/php -q
On Mon, Aug 20, 2001 at 05:14:22PM +0100, Bill Brigden wrote:
> Hi all,
>
> How could I use a script on the console - to interact, and take the users
> input. Like a shell/perl script - but in php?
>
> Bill.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> T
Hi all,
How could I use a script on the console - to interact, and take the users
input. Like a shell/perl script - but in php?
Bill.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the
4 matches
Mail list logo