首页 > php文件操作 > php判断文件是否存在file_exists 与 is_file详解

php判断文件是否存在file_exists 与 is_file详解

$file ='新建文本文档.txt';
$file1 ='a.txt'; 
list($name,$ext) = explode('.',$file); 
echo $name; 
 
if( is_file( $name.'.txt' ) ) 
{ 
 echo 'file存在'; 
} 
if( file_exists( $file1 ) ) 
{ 
 echo 'file1存在'; 
}


文章网址:https://www.phprm.com/wenjian/fs586.html

随意转载^^但请附上教程地址。

标签:文件 php判断 是否存在

相关文章

发表留言