phpseclib sftp->put() command: File contents are just a string, not the expected PDF document
问题 I'm trying to upload a PDF document from a stage server to a remote location using $sftp-put(); CODE: $sftp = new SFTP($config::SFTP_SERVER); // login to remote server if (!$sftp->login($config::SFTP_USER, $config::SFTP_PASSWORD)) { throw new Exception('Login failed'); } // move to relevant directory $sftp->chdir('fatca'); // upload file $uploadFile = $sftp->put('test-pdf-upload.pdf', '/srv/www/vhosts/stage.johno.com/fatca/src/uploads/pdfs/345-553453-434__05122017_16:45:26.pdf', NET_SFTP