阅读背景:

确定文件是否是PHP中的图像的最佳方法是什么?

来源:互联网 

I have a sever which people can upload files to. The problem is that some of the filenames are mangled (dont have any extension) and so I cannot immediately determine file type. This question is two part: for the files which do have filenames what is the best way to determine whether or not it is an image? (Just a big long if/else if list?) Secondly, for the files which dont have extensions, how can I determine if they are images?I have a sever which people can upload files to




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: