Advertisement
Guest User

Untitled

a guest
Jan 13th, 2013
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. $sPath = "./files/" . $userid . "/";
  2.  
  3. if (chdir($sPath)) {
  4.  
  5.     //   $dirs = glob('*', GLOB_ONLYDIR);
  6.        
  7.        $dirs = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($sPath), RecursiveIteratorIterator::SELF_FIRST);
  8.        
  9.        foreach($dirs as $val){
  10.           echo '<option value="'.$val.'">'.$val."</option>\n";
  11.        }        
  12.         } else {
  13.        echo 'Changing directory failed.';
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement