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

search for in the

finfo_close> <Fileinfo 関数
Last updated: Fri, 03 Oct 2008

view this page in

finfo_buffer

(PECL fileinfo:0.1-1.0.4)

finfo_buffer文字列バッファの情報を返す

説明

string finfo_buffer ( resource $finfo , string $string [, int $options [, resource $context ]] )
finfo
string buffer ( string $string [, int $options [, resource $context ]] )

この関数は、バイナリデータの情報を文字列形式で返すために使用します。

パラメータ

finfo

finfo_open() が返す fileinfo リソース。

string

調べるファイルの内容。

options

ひとつあるいは複数のFileinfo 定数の組み合わせ。

context

返り値

string のテキスト表現、あるいはエラーが発生した場合に FALSE を返します。

例1 finfo_buffer() の例

<?php
$finfo 
= new finfo(FILEINFO_MIME);
echo 
$finfo->buffer($_POST["script"]) . "\n";
?>

上の例の出力は、たとえば 以下のようになります。

application/x-sh

参考



add a note add a note User Contributed Notes
finfo_buffer
There are no user contributed notes for this page.

finfo_close> <Fileinfo 関数
Last updated: Fri, 03 Oct 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites