Domanda

I can't find this in any of the documentation on php.net so I'm not sure if it's a feature. Is there a response for ssh2_scp_send to check whether a file was sent successfully.

i.e. when using the line

ssh2_scp_send($connection, $filePath, $target);

Is there a call back or response that can be checked, or can it be wrapped in a try/catch to check whether the file was successful?

È stato utile?

Soluzione

There's nothing in the SCP protocol that does anything like that. The best you're going to be able to do is md5 or sha1 or something on the uploaded file and md5 on your original file and see if they match..

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top