file_put_contents() is issuing an error when trying to export an image

前端 未结 4 964
攒了一身酷
攒了一身酷 2021-01-19 20:36

I have created an image by copying a number of images into a new one. In the last step of my program, I am trying to export this file into a folder.

The code is as

4条回答
  •  面向向阳花
    2021-01-19 20:54

    file_put_contents as per PHP manual takes the second argument a string. An image file is not a string. See the two other answeres above. That is how you save images. Try using the manual a bit more.

提交回复
热议问题