1
こんにちは私はいくつかのsshコマンドを1つのセッションで実行していますが、コマンドプロンプトで2つのコマンドが実行され、結果が表示されますWebページには、結果の半分だけが表示されます。つまり、最初の実行の結果であり、2回目の実行のほんの一部です。誰かが私を助けてくれますか?私はあなたのプロンプトがあなたの$ssh->read()
通話のそれぞれで異なっている気づくウェブページはsshの実行結果の一部を示しています
echo $ssh->read('[email protected]:~$');
$ssh->write("dis inter eth-trunk 3\n"); // note the "\n"
$results= $ssh->read('[email protected]:~$');
echo $results;
$myfile = fopen("data1.txt", "w") or die("Unable to open file!");
$txt = $results;
fwrite($myfile, $txt);
fclose($myfile);
echo $ssh->read('[email protected]:~$');
$ssh->write("dis inter eth-trunk 12\n"); // note the "\n"
$result= $ssh->read('username:~$');
echo $result;