I'm trying to delete a folder that I have created earlier.
Take a look at the following code, please
$path = "\maa\\files\\tal\\$kurs\\$kursavsnitt\\$uid";
if ($handle = opendir($path)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
unlink ($path.'/'.$file);
}
}
closedir($handle);
}
unlink("d:\\maa\\files\\tal\\$kurs\\$kursavsnitt\\$uid");
As you see I first delete all files that are in the folder
then with the
"unlink("d:\...." I try to delete the folder, but I am not successful 🙁
The files are deleted but I can't delete the folder "$uid".
Has anyone an idea?
thanks