WordPress.org

Support

Support » Plugins and Hacks » [Resolved] I Can't move file to sftp

[Resolved] I Can't move file to sftp

Viewing 3 replies - 1 through 3 (of 3 total)
  • Ok, I figured more, and came a little closer to the answer.
    I want upload file(archive) to the sftp server.
    Code for now is:
    $content = $sftp->get_contents($filename);
    $sftp->put_contents($filename, $content);

    File has been transferred, but its size is “0”. I can’t get the content of the file. $sftp->get_contents($filename) returns nothing.

    Plugin Author TerraFrost

    @terrafrost

    If you’re trying to use the SFTP library of this addon programmatically.. I think you’d be better of using phpseclib instead:

    http://phpseclib.sourceforge.net/sftp/intro.html

    It’s what this addon uses for SFTP compatibility and, overall, that API is pretty well documented (imho).

    Thanks, it’s really helped!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] I Can't move file to sftp’ is closed to new replies.