0

デスクトップに putty.exe があるので、コマンド プロンプトに移動して C:\Documents and Settings\user\Desktop場所に移動し、次のコマンドを実行すると、指定したサーバーへの telnet 接続の Putty ウィンドウが起動します。

putty.exe telnet://a.b.c.d/

以下を使用して特定のサーバーにtelnetするためのパテを起動しようとしていますが、うまくいきません:

<?php
$securecrt = "C:\\Documents and Settings\\user\\Desktop\\putty.exe telnet://a.b.c.d/ ";


exec($securecrt);
?>

If I try following then it launches the putty application but will have to provide the host name or IP to login:

<?php
$securecrt = "C:\\Documents and Settings\\user\\Desktop\\putty.exe ";


exec($securecrt);
?>

非常に基本的なものが欠けているかどうかわかりません。誰かがこれを手伝ってくれると助かります。

4

1 に答える 1

0

Putty を使用する代わりに、fsock で PHP を使用するか、http://www.geckotribe.com/php-telnet/のようなクラスを使用することができます。

ただし、現在の設定を使用して次のことを試すことができます。

$securecrt = '"C:\Documents and Settings\user\Desktop\putty.exe" telnet://a.b.c.d/';
于 2012-07-05T18:31:42.430 に答える