开发者

tty with shell_exec?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜