ftp_put is corrupting my movies after transfer, is it wrong?

后端 未结 1 1551
你的背包
你的背包 2020-11-28 16:28

I have a bunch of movies that I\'m trying to transfer from my CentOS server onto my Windows PC. But when I run them through this script they end up being corrupt. Is there s

相关标签:
1条回答
  • 2020-11-28 16:41

    You're trying to upload something other than a text-based file while using

    (ftp_put($conn_id, $remote_file, $localfile, FTP_ASCII))
    

    You should be using FTP_BINARY instead of FTP_ASCII since movies (and images) are binary files.

    0 讨论(0)
提交回复
热议问题