Welcome Guest, Not a member yet? Register   Sign In
Deleting folders and their content.
#9

Try to remove the folder and content with nativ php .. if there is the same behavior you must have a config, logic or error. For e.g. like that:

Code:
function recursiveRmDir($dir)
{
    $iterator = new RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS), \RecursiveIteratorIterator::CHILD_FIRST);
    foreach ($iterator as $filename => $fileInfo) {
        if ($fileInfo->isDir()) {
            rmdir($filename);
        } else {
            unlink($filename);
        }
    }
}

Reply


Messages In This Thread
RE: Deleting folders and their content. - by Rufnex - 04-23-2017, 10:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB