删除 "images" 目录:
<?php
$path = "images";
if(!rmdir($path)) {
echo ("Could not remove $path");
}
?>
rmdir() 函数删除一个空目录。
rmdir(
dir,
context)
Parameter | Description |
---|---|
dir | Required. Specifies the path to the directory to be removed |
context | Optional. Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream |
返回值: | TRUE 成功,FALSE 失败 |
---|---|
PHP 版本: | 4.0+ |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!