Is it possible to do shell_exec in PHP, which requires a tty?
<?php
$output = shell_exec("read foo; echo $foo");
?>
If not开发者_开发技巧, what are the alternatives?
What about:
<?php
echo shell_exec('read foo; export foo; echo $foo');
Note: The var foo will not be available in your shell after the script exit.
精彩评论