Using phpseclib to close Net_SFTP connection

I have a program written in PHP that distributes files to different FTP sites. I recently added SFTP support using phpseclib . It is very easy to use for registering and uploading files.

However, there doesn't seem to be an explicit function to close the connection. This is important to me because I am dealing with connecting / disconnecting to multiple sites during processing.

How do I close the Net_SFTP connection?


source to share

1 answer

Is your connection getting it down ( as shown in this Perl 5 example)?



where $sftp

is a variable containing your connection.



All Articles