downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

HttpResponse::redirect> <HttpResponse::getThrottleDelay
[edit] Last updated: Fri, 24 May 2013

view this page in

HttpResponse::guessContentType

(PECL pecl_http >= 0.13.0)

HttpResponse::guessContentTypecontent type を推測する

説明

static string HttpResponse::guessContentType ( string $magic_file [, int $magic_mode = MAGIC_MIME ] )

指定された本文の content type を、libmagic を使用して推測します。

推測に成功すると、その結果の Content-Type が自動的にレスポンスの Content-Type として設定されます。

パラメータ

magic_file

使用する magic.mime データベース。

magic_mode

libmagic のフラグ。

返り値

成功した場合は推測した content type、 失敗した場合に FALSE を返します。

エラー / 例外

HttpRuntimeExceptionHttpInvalidParamException をスローします。

参考



add a note add a note User Contributed Notes HttpResponse::guessContentType - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites