定义和用法is_file() 函数检查指定的文件是否是常规的文件。 如果文件是常规的文件,该函数返回 TRUE。 语法is_file(file)
提示和注释注释:该函数的结果会被缓存。请使用 clearstatcache() 来清除缓存。 实例<?php$file = "test.txt";if(is_file($file)) { echo ("$file is a regular file"); }else { echo ("$file is not a regular file"); }?> 上面的代码将输出: test.txt is a regular file
下载地址: PHP is_executable() 函数 PHP is_link() 函数 |