SHARE
TWEET

Untitled

a guest May 19th, 2017 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. ?>
RAW Paste Data
Top