skip to Main Content

Php – File upload failed

I have recently installed phpseclib and trying to upload a simple CSV file to a remote SFTP server but not getting any success. The local file is in the root directory and the remote path is also going to the…

VIEW QUESTION

How can I get the logging from phpseclib and SFTP?

I am using below code to transfer files to an SFTP server use phpseclib3NetSFTP; $sftp = new SFTP('localhost'); $sftp->login('user', 'password'); error_log($sftp->pwd()); foreach ($fileList as $key => $value) { $output = $sftp->put("//data//myfile.txt, //sourceFile.txt, SFTP::SOURCE_LOCAL_FILE); error_log($output); } error_log($sftp->getLastError()); // error_log($sftp->getSFTPLastError()); error_log('------------------------------------'); error_log("<pre>"…

VIEW QUESTION
Back To Top
Search