file_exists() 函数检查文件或目录是否存在。
如果指定的文件或目录存在则返回 TRUE,否则返回 FALSE。
file_exists(path)
<?phpecho file_exists("test.txt");?>
上面的代码将输出:
1