当前位置:编程学习 > php >>

php文件是否存在 file_exists 用法

说明:file_exists($filepath);

本函数是用户判断当前给的文件名是否存了了,下面我们来看个实例。


$filepath = './test.php';

if( file_exists($filepath) )
{
 echo '文件存在';
}
else
{
 echo '文件不存在';
}

输出结果为:文件存在了

 

本站原创转载注明www.226511.com/phper/php.html

补充:Php教程,Php入门 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,