Ben soru aynı dizi çıktıya birkaç satır çalıştırır ve sonra sağladığı zaman sorar benim linux sunucu üzerinde bir program var. Amacım bir php script ile giriş ve çıkış otomatik hale getirmektir.
Program komut satırında girişini kabul için tasarlanmış değildir. Bunun yerine, program, soru 1 sorar ve vb, klavyeden bir cevap için, daha sonra programın soru 2 sorar ve klavyeden bir cevap bekler bekler
I know how to capture the output in an array by writing: $out = array(); exec("my/path/program",$out);
But how do I handle the input? Assume the program asks 3 questions and valid answers are: left 120 n What is the easiest way using php to pass that input to the program? Can I do it somehow on the exec line?
I’m not a php noob but simply have never needed to do this before. Alas, my googling is going in circles.