So what it does is successfully connects then uploads the file logo.png
but the contents of the file isn't what was on web host or uploaded with html if i use a html upload code. What it puts in the file is the ACTUAL text between the second ' 's so for that very example the contents of logo.png is literally logo.png
and not the picture.
require_once("ftp/vendor/autoload.php");
use phpseclib\Net\SFTP;
$sftp = new SFTP('SERVER');
if (!$sftp->login('USER', 'PW')) {
throw new Exception('Login failed');
}
$sftp->put("/some/path/logo.png", "logo.png", NET_SFTP_LOCAL_FILE);