PHP CURL Download File

后端 未结 3 2052
逝去的感伤
逝去的感伤 2020-12-06 10:10

im trying to download a file from a url, when I use the browser the download dialog works but when I use this code the new file on my server stay empty.

$ch          


        
3条回答
  •  不思量自难忘°
    2020-12-06 10:55

    1. Did you check if result actually contains data?
    2. with fputs on larger files you need to specify byte length
    3. Try using file_put_contents($destination, $data);

提交回复
热议问题