PHP file_exists() Function
Complete PHP Filesystem Reference Manual
Definition and Usage
The file_exists() function checks whether a file or directory exists.
Returns TRUE if the specified file or directory exists, FALSE otherwise.
Syntax
file_exists(path)
| Parameters | Description |
|---|---|
| path | Required. Specifies the path to check. |
Example
The code above will output:
1
Complete PHP Filesystem Reference Manual