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

file_exists

检查文件或目录是否存在
名称:file_exists
分类:文件系统
所属语言:php
一句话介绍:检查文件或目录是否存在。

实例

<span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">file_exists</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>

输出:

1
同类函数
  • 判断文件是否存在且可读  is_readable

    is_readable

    判断文件是否存在且可读
  • 把整个文件读入一个数组中  file

    file

    把整个文件读入一个数组中
  • 返回符号链接的目标  readlink

    readlink

    返回符号链接的目标
  • 获取文件修改时间  filemtime

    filemtime

    获取文件修改时间
  • 获取文件所有者  fileowner

    fileowner

    获取文件所有者
  • 清除文件状态缓存  clearstatcache

    clearstatcache

    清除文件状态缓存
  • 获取文件权限  fileperms

    fileperms

    获取文件权限
  • 提供有关文件的信息  stat

    stat

    提供有关文件的信息