proceed with caution
as the documentation already says
FILEINFO_MIME will output something like "image/jpeg; charset=binary"
while
FILEINFO_MIME_TYPE outputs "image/jpeg"
and
FILEINFO_MIME_ENCODING outputs "binary"
Constantele de mai jos sunt definite de această extensie și vor fi disponibile doar dacă această extensie a fost compilată în interiorul PHP, sau a fost încărcată dinamic în timpul rulării.
FILEINFO_NONE
(int)
FILEINFO_SYMLINK
(int)
FILEINFO_MIME_TYPE
(int)
FILEINFO_MIME_ENCODING
(int)
FILEINFO_MIME
(int)
FILEINFO_COMPRESS
(int)
FILEINFO_DEVICES
(int)
FILEINFO_CONTINUE
(int)
FILEINFO_PRESERVE_ATIME
(int)
FILEINFO_RAW
(int)
\ooo
octal
representation.
FILEINFO_EXTENSION
(int)
JPEG
images, then the return value is multiple extensions separated by a forward slash e.g.:
"jpeg/jpg/jpe/jfif"
. For unknown types not available in the
magic.mime database, then return value is "???"
.
Available since PHP 7.2.0.
proceed with caution
as the documentation already says
FILEINFO_MIME will output something like "image/jpeg; charset=binary"
while
FILEINFO_MIME_TYPE outputs "image/jpeg"
and
FILEINFO_MIME_ENCODING outputs "binary"