PHP- Get file type by URL

后端 未结 7 1256
太阳男子
太阳男子 2020-12-31 16:54

I want to get the file type (eg. image/gif) by URL using PHP.I had tried



        
7条回答
  •  醉梦人生
    2020-12-31 17:50

    exif_imagetype returns the image type. The response, 3, indicates it is IMAGETYPE_PNG, the correct response.

提交回复
热议问题