Forum und email

HttpResponse::setContentType

(PECL pecl_http:0.10.0-1.5.5)

HttpResponse::setContentType — content type を設定する

説明

static bool HttpResponse::setContentType ( string $content_type )

送信されるエンティティの Content-Type を設定します。

パラメータ

content_type

送信されるエンティティの content type (primary/secondary)。

返り値

成功した場合に TRUE を返します。 content type にプライマリパート、セカンダリパートが含まれていない場合に FALSE を返します。