Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Happiness1

    (@happiness1)

    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:

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

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

    Thread Starter Happiness1

    (@happiness1)

    Thanks, it’s really helped!

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