The rmdir() function removes an empty directory.This function returns TRUE on success, or FALSE on failure.
bool rmdir ( string $dirname [, resource $context ] )
Attempts to remove the directory named by dirname. The directory must be empty, and the relevant permissions must permit this. A E_WARNING level error will be generated on failure.
Parameter | Description |
---|---|
dir | Specifies the directory to be removed |
context | Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream |