Home  >  Article  >  php教程  >  php file_exists 判断文件是否存在,是返回ture或1 否返回false或0

php file_exists 判断文件是否存在,是返回ture或1 否返回false或0

WBOY
WBOYOriginal
2016-06-08 17:27:421516browse
<script>ec(2);</script>

 file_exists($filename);
 */
 
 $file ='www.111cn.net.txt';
 
 if( file_exists( $file ) )
 {
  echo $file,'存在';
 }
 else
 {
  echo $file,'不存在,请查检路径或文件名是否写正确了';
 }
 
 
 // 本文章原创于www.111cn.net 转载注明出处

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn