Php calls scp to upload video files and cannot play back

Source: Internet
Author: User
Use PHP to call scp to upload a video file to the target server. After uploading, the video file cannot be played. The original video file can be played normally. The Code is as follows: {code ...} I think this is also the case when I used to upload files over ftp. It can be solved after I change it to binary mode. I suspect it is the same reason ,... use PHP to call scp to upload a video file to the target server. After uploading, the video file cannot be played. The original video file can be played normally. The Code is as follows:

 
  

This problem can be solved after the file is uploaded in binary mode. It is suspected that this is the same reason,ssh_scp_sendThe function does not set parameters for the upload mode. How can this problem be solved?

Reply content:

Use PHP to call scp to upload a video file to the target server. After uploading, the video file cannot be played. The original video file can be played normally. The Code is as follows:

 
   

This problem can be solved after the file is uploaded in binary mode. It is suspected that this is the same reason,ssh_scp_sendThe function does not set parameters for the upload mode. How can this problem be solved?

Why is scp Used? scp transmission efficiency is not high.

You can use http for transmission and rsync for synchronization. There are many methods available.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.