01.
<?php
02.
$objConnect
= mysql_connect(
"localhost"
,
"root"
,
""
)
or
die
(
"Error Connect to Database"
);
03.
$objDB
= mysql_select_db(
"test"
);
04.
05.
$strSQL
=
"DELETE FROM member "
;
06.
$strSQL
.=
"WHERE Username = '"
.
$_GET
[
"CusID"
].
"' "
;
07.
$objQuery
= mysql_query(
$strSQL
);
08.
$Username
=
$_GET
[
"CusID"
];
09.
10.
11.
$dir
=
$Username
;
12.
$path
=
'Files/'
.
$Username
;
13.
14.
15.
var_dump(
$dir
);
16.
17.
18.
function
removeFolder(
$dir
){
19.
if
(!
is_dir
(
$dir
))
20.
return
false;
21.
for
(
$s
= DIRECTORY_SEPARATOR,
$stack
=
array
(
$dir
),
$emptyDirs
=
array
(
$dir
);
$dir
=
array_pop
(
$stack
);){
22.
if
(!(
$handle
= @dir(
$dir
)))
23.
continue
;
24.
while
(false !==
$item
=
$handle
->read())
25.
$item
!=
'.'
&&
$item
!=
'..'
&& (
is_dir
(
$path
=
$handle
->
$path
.
$s
.
$item
) ?
26.
array_push
(
$stack
,
$path
) &&
array_push
(
$emptyDirs
,
$path
) : unlink(
$path
));
27.
$handle
->close();
28.
}
29.
for
(
$i
=
count
(
$emptyDirs
);
$i
--;
rmdir
(
$emptyDirs
[
$i
]));
30.
}
31.
32.
33.
34.
35.
36.
37.
38.
39.
?>