PHP code example of jorgeuos / simple-sftp
1. Go to this page and download the library: Download jorgeuos/simple-sftp library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jorgeuos / simple-sftp example snippets
$url = "0.0.0.0";
$port = 22;
$username = "foo";
$password = "pass";
$filePath = "/usr/local/var/www/test.txt";
$destinationPath = "upload/test.txt";
$jorgeuosSftpClient = new SimpleSftpClient($url, $port, $username, $password);
$jorgeuosSftpClient->sftpPut($destinationPath, $filePath);