Advertisement
Guest User

Untitled

a guest
May 19th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. <?php
  2. // ensure $dir ends with a slash
  3. $dir = "../downloads/clientes/".$row_Recordset2['utilizador']/
  4. function delTree($dir) {
  5.     $files = glob( $dir . '*', GLOB_MARK );
  6.     foreach( $files as $file ){
  7.         if( substr( $file, -1 ) == '/' )
  8.             delTree( $file );
  9.         else
  10.             unlink( $file );
  11.     }
  12.     rmdir( $dir );
  13. }
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement