I have been working more and more with the command line php on UNIX and find myself wanting some kind of promt feature.
If this can even be done yet with the command line php can someone please give a few links to read or a quick exp of a script that would print: what is your name...then echo hello $name
Thanks
PHP-Cli Help
Moderator: General Moderators
Chapter 25. Using PHP from the command line and
Code: Select all
<?php
$stdin = fopen('php://stdin', 'r');
print('name :');
$n = fgets($stdin, 64);
print("Hi, $n");
?>