[Calculation] DOS internal command: This command is used to delete blank subdirectories in the disk
php rmdir() function syntax
Function:Delete empty directories.
Syntax: rmdir(dir,context)
Parameters:
Parameters | Description |
dir | Required. Specifies the directory to be deleted. |
context | Required. Specifies the environment for a file handle. Context is a set of options that modify the behavior of the stream. |
Description: Try to delete the directory specified by dir. The directory must be empty and must have appropriate permissions.
php rmdir() function example
<?php $dir = rmdir("newFile"); if($dir) { echo "目录删除成功"; }else{ echo "目录删除失败"; } ?>