The is_file() function checks whether the specified file is a regular file.
bool is_file ( string $filename )
Tells whether the given file is a regular file.
Returns TRUE if the filename exists and is a regular file, FALSE otherwise.
The above example will output : -
bool(true) bool(false)
Parameter | Description |
---|---|
file | Required. Specifies the open file to check |