PHP rmdir () function
Definition and Usage
rmdir () function to delete empty directories.
If successful, the function returns TRUE. If it fails, it returns FALSE.
grammar
rmdir(dir,context)
参数 | 描述 |
---|---|
dir | 必需。规定要删除的目录。 |
context | 可选。规定文件句柄的环境。context 是一套可以修改流的行为的选项。 |
Examples
<?php
$path = "images";
if(!rmdir($path))
{
echo ("Could not remove $path");
}
?>
$path = "images";
if(!rmdir($path))
{
echo ("Could not remove $path");
}
?>
Complete PHP Filesystem Reference Manual