function full_del_dir($directory )2. {3. $dir = opendir( $directory ) ;4. while (( $file= readdir ( $dir )))5. {6. if ( is_file($directory . "/" . $file ))7. unlink ( $directory . "/" .$file) ;8. elseif ( is_dir($directory . "/" . $file ) &&($file != "." ) && ( $file !=".." ))9. full_del_dir($directory . "/" . $file ) ;0. }1. closedir ( $dir ) ;2. rmdir ( $directory ) ;3. return TRUE;4. }