0
即時通訊嘗試打開遠程主機上的文件並閱讀它,但我得到了返回值1. 也許任何人都可以找到我的錯誤。php ssh2 fgets();
public function get()
{
return $stream = file_get_contents("ssh2.sftp".$this->connection."/home/user/logfile.txt");
}
$這個 - >連接:
public function __construct($host , $port , $user , $pass)
{
if(!$this->connection = ssh2_connect($host, $port)) return -1;
if(ssh2_auth_password($this->connection, $user, $pass)) return -1;
return 1;
}
連接工作也可以發送其它命令像焦油...