电脑爱好者,提供IT资讯信息及各类编程知识文章介绍,欢迎大家来本站学习电脑知识。 最近更新 | 联系我们 RSS订阅本站最新文章
电脑爱好者
站内搜索: 
当前位置:首页>> PHP>>php文件操作一例:php判断文件是否存在file_exists:

php文件操作一例:php判断文件是否存在file_exists

来源:网络 | 2013-3-3 | (有1215人读过)

核心函数:file_exists

<?php  
$filename = ’cncfan.com.php’;  
if (file_exists($filename)) {  
echo "The file $filename exists";  
} else {  
echo "The file $filename does not exist";  
}  
?>  

如果存在该文件,则会提示the file cncfan.com.php exists.

如果不存在该文件,则会提示,the file cncfan.com.php does not exist.
PHP热门文章排行
网站赞助商
购买此位置

 

关于我们 | 网站地图 | 文档一览 | 友情链接| 联系我们

Copyright © 2003-2024 电脑爱好者 版权所有 备案号:鲁ICP备09059398号