Answer the question
In order to leave comments, you need to log in
How to send a folder (all files in it) via sftp in php?
Please help me how to implement this (preferably without installing php add-ons (libraries) on the server), since I only have a WordPress site on hosting.
I rummaged through a lot of articles - I did not find a single example of sending a folder (all files in it) via sftp
Through ftp, but not through sftp ...
By "sending a folder (all files in it)" I mean upload.
Answer the question
In order to leave comments, you need to log in
$connection = ssh2_connect('www.example.ru', 22);
ssh2_auth_password($connection, 'username', 'password');
ssh2_scp_send($connection, '/local/filename', '/remote/filename', 0644);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question