function
delDir(
$dirName
='' ){
if
(
$handle
= opendir(
"$dirName"
) ) {
while
( false !== (
$item
= readdir(
$handle
) ) ) {
if
(
$item
!=
"."
&&
$item
!=
".."
) {
if
(
is_dir
(
"$dirName/$item"
) ) {
$this
->delDir(
"$dirName/$item"
);
}
else
{
unlink(
"$dirName/$item"
);
}
}
}
closedir
(
$handle
);
}
}
delDir('目录');