How do you detect an image MIME type if you know of the image in a
directory? For example, I know of:
[PHP]
if (is_file("$myIm agePath/$myImageName")) { // FIND MIME TYPE BUT HOW
I DUNNO
}
[/PHP]
The only way I could think of was to determine the extension of the
image and search through /etc/mime.types, which is horrifically
impractical but the only thing I can think of. What would you suggest
I do?
Thanx
Phil
directory? For example, I know of:
[PHP]
if (is_file("$myIm agePath/$myImageName")) { // FIND MIME TYPE BUT HOW
I DUNNO
}
[/PHP]
The only way I could think of was to determine the extension of the
image and search through /etc/mime.types, which is horrifically
impractical but the only thing I can think of. What would you suggest
I do?
Thanx
Phil
Comment