The is_dir() function checks whether the specified file is a directory.This function returns TRUE if the directory exists.
bool is_dir ( string $filename )
Tells whether the given filename is a directory.
The above example will output : -
bool(false) bool(false) bool(true)
Parameter | Description |
---|---|
file | Required. Specifies the file to check |