0
是否有可能在PHP中執行shell_exec,這需要一個tty?tty with shell_exec?
<?php
$output = shell_exec("read foo; echo $foo");
?>
如果不是,有哪些選擇?
是否有可能在PHP中執行shell_exec,這需要一個tty?tty with shell_exec?
<?php
$output = shell_exec("read foo; echo $foo");
?>
如果不是,有哪些選擇?
什麼:
<?php
echo shell_exec('read foo; export foo; echo $foo');
注:VAR foo將不會在腳本退出後你的shell可用。
你想讀取一個tty?這仍然是你想要回答的問題嗎? – emilyk
@emilyk我不記得我爲什麼需要這個。 – Tyilo