rmdir
Delete directory
rmdir()
function deletes an empty directory.
If successful, the function returns true. If it fails, return false.
<?php $path = "images"; if(!rmdir($path)) { echo ("Could not remove $path"); } ?>
rmdir ( dir , context )
parameter | describe |
---|---|
dir | Required. Specify the directory to be deleted. |
context | Required. Specifies the environment for file handles. Context is a set of options that can modify the behavior of a stream. |
Try to delete the directory specified by dir . The directory must be empty and must have corresponding permissions.