首页 > php代码 > php file_exists 判断文件是否存在,是返回ture或1 否返回false或0

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

<?php
file_exists($filename); * /$file = 'www.phprm.com.txt';
if (file_exists($file)) {
    echo $file, '存在';
} else {
    echo $file, '不存在,请查检路径或文件名是否写正确了';
}


永久链接:https://www.phprm.com/code/9be7414b35e3995f2571943ca92a548c.html

转载随意!带上文章地址吧。

标签:none

发表留言