I'm having a good deal of trouble sending a file from a linux server to a windows server over SFTP via PHP.
I seem to be connecting just fine, but it always throws an error that I can't create the file on the remote server's end. It's possible that I am messing up at the syntax for the file location.
I have tried two ways now, one using ssh2_scp_send()
, and another trying
fopen(ssh2.sftp://D:/path/file.csv)
Also, logging into the sftp server via a client puts me at my home folder (ie D:\path\to\home) but if I do a
ssh2_exec($connection, 'cd');
and print the stream to the screen, it shows me that my ssh session is currently in the windows filesystem on the C drive.
Birisi bu konuda bazı tavsiyeler var umuyordum. Ve ben bu yönteme evli değilim. Bir drupal modülünden gelen tüm çünkü benim ucunda php kullanıyorum, ama ben her zaman denemek ve başka bir yöntemi dahil olabilir.