$remote_path
is recognized as a filename, not a directory name.
If you know how to send files to the specified directory, please contact us.
(Example) Files such as \home\user\test.csv
are created.
test.csv
is not sent to the directory \home\user
.
if(!ssh2_scp_send($connection,$local_path.$fileName,$remote_path.$fileName,0644)){
// error handling
}
Environment: xampp + PHP 7.1
php cakephp scp
The third argument of ssh2_scp_send
is always the path of the file (not the directory).
reference:
ssh2_scp_send-PHP Manual
ssh2_scp_send(
resource$session,
string$local_file,
string$remote_file,
int$create_mode=0644
) :bool
911 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
617 Uncaught (inpromise) Error on Electron: An object could not be cloned
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
578 Understanding How to Configure Google API Key
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
© 2024 OneMinuteCode. All rights reserved.