首页 > PHP教程 > PHP常用函数手册 > PHP 文件系统函数

PHP file_exists() 函数

 函数原型

/**

 * 检查文件或目录是否存在

 * @link http://php.net/manual/en/function.file-exists.php

 * @param string $filename  文件或目录的路径

 * @return bool  如果指定的文件或目录存在则返回 TRUE,否则返回 FALSE。

 * @since 4.0

 * @since 5.0

 */

function file_exists ($filename) {}

 

函数示例

<?php

echo file_exists("a.php");

?>

关闭
感谢您的支持,我会继续努力!
扫码打赏,建议金额1-10元


提醒:打赏金额将直接进入对方账号,无法退款,请您谨慎操作。