Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $sPath = "./files/" . $userid . "/";
- if (chdir($sPath)) {
- // $dirs = glob('*', GLOB_ONLYDIR);
- $dirs = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($sPath), RecursiveIteratorIterator::SELF_FIRST);
- foreach($dirs as $val){
- echo '<option value="'.$val.'">'.$val."</option>\n";
- }
- } else {
- echo 'Changing directory failed.';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement