Book/fileinfo-Phpdoc专题
文件信息
目录
- 简介
- 安装/配置
- 预定义常量
- Fileinfo 函数
- finfo_buffer — 返回一个字符串缓冲区的信息
- finfo_close — 关闭 fileinfo 资源
- finfo_file — 返回一个文件的信息
- finfo_open — 创建一个 fileinfo 资源
- finfo_set_flags — 设置 libmagic 配置选项
- mime_content_type — 检测文件的 MIME 类型
- finfo — finfo 类
- finfo::buffer — 别名 finfo_buffer()
- finfo::__construct — 别名 finfo_open
- finfo::file — 别名 finfo_file()
- finfo::set_flags — 别名 finfo_set_flags()
简介
该类在 fileinfo 函数集中提供了一个面向对象的接口。
类摘要
finfo
class finfo {
public <span
class="methodname">__construct ([ <span
class="methodparam">int $flags<span
class="initializer"> = FILEINFO_NONE [, <span
class="methodparam">string
$magic_database = "" ]] )
public <span
class="type">stringfalse <span
class="methodname">buffer ( <span
class="type">string $string [, <span
class="methodparam">int $flags<span
class="initializer"> = FILEINFO_NONE [, <span
class="methodparam"><span
class="type">resourcenull
$context = null ]] )
public <span
class="type">stringfalse <span
class="methodname">file ( <span
class="type">string $filename [, <span
class="methodparam">int $flags<span
class="initializer"> = FILEINFO_NONE [, <span
class="methodparam"><span
class="type">resourcenull
$context = null ]] )
public bool
set_flags ( <span
class="methodparam">int $flags )
}
finfo::buffer
说明
public <span
class="type">stringfalse <span
class="methodname">finfo::buffer ( <span
class="methodparam">string $string
[, int
$flags = FILEINFO_NONE
[, <span
class="type">resourcenull
$context = null ]] )
此函数是该函数的别名: finfo_buffer()
finfo::__construct
别名 finfo_open
说明
public <span
class="methodname">finfo::__construct ([ <span
class="methodparam">int $flags<span
class="initializer"> = FILEINFO_NONE [, <span
class="methodparam">string
$magic_database = "" ]] )
此函数是该函数的别名: finfo_open
finfo::file
别名 finfo_file()
说明
public <span
class="type">stringfalse <span
class="methodname">finfo::file ( <span
class="type">string $filename [, <span
class="methodparam">int $flags<span
class="initializer"> = FILEINFO_NONE [, <span
class="methodparam"><span
class="type">resourcenull
$context = null ]] )
此函数是该函数的别名: finfo_file()
finfo::set_flags
说明
public bool
finfo::set_flags ( <span
class="methodparam">int $flags )
此函数是该函数的别名: finfo_set_flags()