Home > Article > Backend Development > Guide to using the is_file() function in PHP_PHP Tutorial
The is_file() function in PHP is used to determine whether a file exists. The usage method is also very simple. Friends who need it can For reference.
The is_file() function checks whether the specified file name is a normal file.
is_file — Tells whether the filename is a regular file
Usage:
bool is_file ( string $filename ) $file is a required parameter
Return TRUE if the file exists and is a normal file.
Let’s look at an example first:
?
2 3 4
|
var_dump(is_file('/usr/bin/')) . "n"; ?>
The above example will output: bool(true) bool(false)
Statement: The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn Previous article:Header jump in php uses include to solve the problem of missing parameters_PHP tutorialNext article:Header jump in php uses include to solve the problem of missing parameters_PHP tutorial Related articlesSee more |