当前位置: 首页> 函数类别大全> 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
同类函数
  • 输出文件  readfile

    readfile

    输出文件
  • 更改文件所有者  chown

    chown

    更改文件所有者
  • 删除目录  rmdir

    rmdir

    删除目录
  • 倒回文件指针的位置  rewind

    rewind

    倒回文件指针的位置
  • stream_set_write_buffer 的别名  set_file_buffer

    set_file_buffer

    stream_set_write_buf
  • 在文件指针中定位  fseek

    fseek

    在文件指针中定位
  • 将缓冲内容输出到文件  fflush

    fflush

    将缓冲内容输出到文件
  • 将上传的文件移动到新位置  move_uploaded_file

    move_uploaded_file

    将上传的文件移动到新位置