当前位置: 首页> 函数类别大全> filetype

filetype

获取文件类型
名称:filetype
分类:文件系统
所属语言:php
一句话介绍:返回文件类型。

实例

例子 1

<span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">filetype</span><span class="token punctuation">(</span><span class="token string double-quoted-string">"test.txt"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

输出:

file

例子 2

<span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">filetype</span><span class="token punctuation">(</span><span class="token string double-quoted-string">"images"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

输出:

dir
同类函数
  • 解析一个配置文件  parse_ini_file

    parse_ini_file

    解析一个配置文件
  • 用模式匹配文件名  fnmatch

    fnmatch

    用模式匹配文件名
  • 输出文件  readfile

    readfile

    输出文件
  • 将缓冲内容输出到文件  fflush

    fflush

    将缓冲内容输出到文件
  • 设定文件的访问和修改时间  touch

    touch

    设定文件的访问和修改时间
  • 打开文件或 URL  fopen

    fopen

    打开文件或URL
  • 给出一个文件或符号连接的信息  lstat

    lstat

    给出一个文件或符号连接的信息
  • 返回路径中的目录部分  dirname

    dirname

    返回路径中的目录部分
热门文章