当前位置: 首页> 函数类别大全> 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
同类函数
  • 改变文件模式  chmod

    chmod

    改变文件模式
  • 倒回文件指针的位置  rewind

    rewind

    倒回文件指针的位置
  • 将数据写入文件  file_put_contents

    file_put_contents

    将数据写入文件
  • 更改文件所有者  chown

    chown

    更改文件所有者
  • 取得文件的 inode  fileinode

    fileinode

    取得文件的inode
  • 返回文件指针读/写的位置  ftell

    ftell

    返回文件指针读/写的位置
  • 取得文件的组  filegroup

    filegroup

    取得文件的组
  • 打开文件或 URL  fopen

    fopen

    打开文件或URL