我的桌面上有putty.exe,因此如果我转到命令提示符,然后转到C:\Documents and Settings\user\Desktop位置并执行以下命令,它将启动到指定服务器的远程登录连接的Putty窗口:
putty.exe telnet://a.b.c.d/
我正在尝试使用以下命令启动putty来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);
?>不确定我是否遗漏了一些非常基本的东西,如果有人能帮上忙那就太好了。
发布于 2012-07-06 02:31:42
除了使用Putty,您还可以尝试使用带fsock的PHP,或者使用像http://www.geckotribe.com/php-telnet/这样的类
但是,您可以使用当前设置尝试以下操作:
$securecrt = '"C:\Documents and Settings\user\Desktop\putty.exe" telnet://a.b.c.d/';https://stackoverflow.com/questions/11348681
复制相似问题