與ssh_exec()
拒絕在Windows中執行命令。
這裏是我的代碼:ssh2_exec不執行簡單的命令
<?php
$connection = ssh2_connect('localhost', 22);
ssh2_auth_none($connection, 'root');
$stream = ssh2_exec($connection, 'C:\Program Files\CCleaner\CCleaner.exe',FALSE);
?>
它讓我看到以下警告:Unable to request a channel from remote host in
。如果您有任何提示,請告訴我。謝謝。
什麼是增加這個結果:'如果($連接!){ 模具( 「連接失敗。」) }' – 2015-10-02 17:18:56