Delete the “images” directory.
<?php $path = “images”; if(!rmdir($path)) { echo (“Could not remove $path”); } ?> |
The rmdir() function deletes an empty directory.
rmdir(dir, context) |
Parameter |
Description |
dir |
Required. Specifies the path of the directory to be deleted. |
context |
Optional. Specifies the context for the file handle, which consists of options that can alter the behavior of the stream. |
Return Value: |
Returns TRUE on success, FALSE on failure. |
PHP Version: |
4.0+ |