function rmdir_recurse($path) { $path = rtrim($path, '/').'/'; $handle = opendir($path); while(false !== ($file = readdir($handle))) { if($file != '.' and $file != '..' ) { $fullpath = $path.$file; if(is_dir($fullpath)) rmdir_recurse($fullpath); else unlink($fullpath); } } closedir($handle); rmdir($path); }

Apuntes
Remover directorios (RMDIR) recursivamente con PHP http://bit.ly/c9DIxZ
This comment was originally posted on Twitter
| 8 Febrero 2010 @ 4:29 pm
Remover directorios (RMDIR) recursivamente con PHP http://bit.ly/c9DIxZ
This comment was originally posted on Twitter
| 10 Febrero 2010 @ 7:14 pm