0
我有一個被調用的php腳本,它通過shell_exec()執行一個shell命令。這個shell命令需要不同階段的多個用戶輸入。我堅持要在每個輸入階段獲得交互性片段。執行從PHP到休息時間的用戶輸入
This is just an example of how I imagine it working...
<?php
$return = shell_exec('runcmd');
//Let runcmd run until first break
echo $return;
$userinput1 = 'foo';
//Let runcmd run until next break
echo $return;
$userinput2 = 'bar';
//Let runcmd run until nth break
echo $return;
$userinputNth = 'nth';
最新大圖?我可以想象更好的選擇。 –
我開放給替代品,主要問題是我沒有編寫shell腳本,但肯定需要通過網絡以某種方式與它交互。 – freeski
ssh2_connect PHP擴展可能有效。 – KNaito