Posted by weberjacob on 10/20/05 01:28
I'm using PHP in command-line mode. I would like to run an external
command, and have it interact with the user just as if he had ran it
from a shell. (I don't need my script to send input to the command).
Ideally I would also like to capture the STDOUT into a variable,
although this is not a requirement.
None of the PHP program-execution commands seem to work for me. The
closest I've come is:
system("ftp")
which takes user input, but it seems to buffer the output until you
type something other than a carriage return. I want it to behave
exactly as it does from a shell. Is this possible?
Thanks,
Jacob
[Back to original message]
|