©
Ce document utilise Manuel du site Web PHP chinois Libérer
(PECL pecl_http >= 1.0.0)
HttpMessage::guessContentType — Guess content type
$magic_file
[, int $magic_mode
= MAGIC_MIME
] )Attempts to guess the content type of the message body through libmagic.
magic_file
the magic.mime database to use
magic_mode
flags for libmagic
Returns the guessed content type on success 或者在失败时返回 FALSE
.
Throws HttpRuntimeException, HttpInvalidParamException.