i dont know whats wrong why the file can't be deleted any 1 can help pls?
$path = "/home//_data/inbox/";
if ($handle = opendir($path)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && preg_match ("/.DAT/", $file)) {
$filesys = $path.$file;
if(file_exists($filesys)){
print $filesys.'<br>';
chmod($filesys,0777);
unlink($filesys);
}
}
}
}
closedir($handle);