PHP is_dir() Function

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.

Example -

The above example will output : -

bool(false)
bool(false)
bool(true)

ParameterDescription
fileRequired. Specifies the file to check