HTTP_Download::setContentType

HTTP_Download::setContentType() – Content-type をセットする

Synopsis

mixed HTTP_Download::setContentType ( string $content_type = 'application/x-octetstream' )

Description

ダウンロードのための適切な Content-type をセットします。

例:

  • application/pdf

  • application/zip

  • text/css

もし、$content_type が有効でない場合、 PEAR_Error が返されます。

Parameter

  • string $content_type = 'application/x-octetstream' - 適切な Content-type を指定します。

Return value

Returns TRUE on success, PEAR_Error on failure.

Note

This function can not be called statically.