简体   繁体   English

PHP ssh2_scp_send响应还是调试?

[英]PHP ssh2_scp_send response or debugging?

I can't find this in any of the documentation on php.net so I'm not sure if it's a feature. 我在php.net上的任何文档中都找不到这个,所以我不确定它是否是一个功能。 Is there a response for ssh2_scp_send to check whether a file was sent successfully. ssh2_scp_send是否有响应,以检查文件是否已成功发送。

ie 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? 是否可以检查回叫或响应,或者可以将其包装在try / catch中以检查文件是否成功?

There's nothing in the SCP protocol that does anything like that. SCP协议中没有做任何类似的事情。 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.. 您最好能够做到的是md5或sha1或上载文件上的某些内容,以及原始文件上的md5并查看它们是否匹配。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM