Suerte adlı üyeden alıntı: mesajı görüntüle
scandir komutu hostingde kapalıdır muhtemelen.
Aşağıdakini deneyin.

function deleteDir($dirPath) {
if (substr($dirPath, strlen($dirPath) - 1, 1) != '/') {
$dirPath .= '/';
}
$files = glob($dirPath . '*', GLOB_MARK);
foreach ($files as $file) {
if (is_dir($file)) {
deleteDir($file);
} else {
unlink($file);
}
}
rmdir($dirPath);
}
deleteDir("kamera");
mkdir("kamera");
function deleteDir($dirPath) {
if (substr($dirPath, strlen($dirPath) - 1, 1) != '/') {
$dirPath .= '/';
}
$files = glob($dirPath . '*', GLOB_MARK);
foreach ($files as $file) {
if (is_dir($file)) {
deleteDir("kamera");
} else {
unlink($file);
}
}
rmdir($dirPath);
}
Bu şekilde yaptım silmedi yine hocam