当前位置: 首页> 函数类别大全> 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
同类函数
  • 返回路径中的目录部分  dirname

    dirname

    返回路径中的目录部分
  • fwrite 的别名  fputs

    fputs

    fwrite的别名
  • 将数据(但不是元数据)同步到文件  fdatasync

    fdatasync

    将数据(但不是元数据)同步到文件
  • 返回文件指针读/写的位置  ftell

    ftell

    返回文件指针读/写的位置
  • 打开进程文件指针  popen

    popen

    打开进程文件指针
  • 提供有关文件的信息  stat

    stat

    提供有关文件的信息
  • 删除目录  rmdir

    rmdir

    删除目录
  • 关闭进程文件指针  pclose

    pclose

    关闭进程文件指针
热门文章