The file_exists() function checks whether or not a file or directory exists.This function returns TRUE if the file or directory exists, otherwise it returns FALSE.
bool file_exists ( string $filename )
Checks whether a file or directory exists.
Parameter | Description |
---|---|
path | Required. Specifies the path to check |
Because PHP's integer type is signed and many platforms use 32bit integers, some filesystem functions may return unexpected results for files which are larger than 2GB.