Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function _rmdir($dir) {
- if (file_exists($dir)){
- $files = glob( $dir . '*', GLOB_MARK );
- foreach( $files as $file ){
- if( substr( $file, -1 ) == '/' )
- _rmdir( $file );
- else
- unlink( $file );
- }
- if (is_dir($dir)) rmdir( $dir );
- }
- }
- ?>
Add Comment
Please, Sign In to add comment