• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Deleting folders and their content.

#10
(04-23-2017, 11:39 AM)Rufnex Wrote: 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);
       }
   }
}

Same result. All folders inside the uploads folder got deleted. It must be a windows thing. I'm going to try it on my hosts server.
Reply


Messages In This Thread
RE: Deleting folders and their content. - by keithmclaughlin - 04-24-2017, 08:07 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.