ImageCreateFromString and getimagesize in PHP

前端 未结 4 589
我寻月下人不归
我寻月下人不归 2021-02-10 22:36

Currently if a user POST/uploads a photo to my PHP script I start out with some code like this

getimagesize($_FILES[\'picture1\'][\'tmp_name\']);
4条回答
  •  眼角桃花
    2021-02-10 23:21

    Not sure if this will help, but I ran into a similar issue and it turned out the firewall controlled by my host was blocking outgoing http connection from my server.

    They changed the firewall settings. My code then worked.

    BTW: I thought this might have been an issue when I tried file_get_contents() on a number of urls, none of which worked!

提交回复
热议问题