sftp
發表於 : 2019-07-25 20:52:09
https://www.php.net/manual/en/function. ... p-send.php
PHP Warning: ssh2_scp_send(): Failure creating remote file: (null) in /home/yehlu/1.php on line 6
https://stackoverflow.com/questions/957 ... -with-sftp
代碼: 選擇全部
$connection = ssh2_connect('shell.example.com', 22);
ssh2_auth_password($connection, 'username', 'password');
ssh2_scp_send($connection, '/local/filename', '/remote/filename', 0644);
https://stackoverflow.com/questions/957 ... -with-sftp
代碼: 選擇全部
include('Net/SFTP.php');
$sftp = new Net_SFTP('www.domain.tld');
if (!$sftp->login('username', 'password')) {
exit('Login Failed');
}
$sftp->put('remote.ext', 'local.ext', NET_SFTP_LOCAL_FILE);