source: temp/trunk/html/test/uehara/test.php @ 8749

Revision 8749, 507 bytes checked in by uehara, 20 years ago (diff)

blank

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1<?php
2
3$arrTree = array();
4$cnt = 0;
5print_r(sfGetFileTree("/home/web/test.ec-cube.net/html/user_data/"));
6
7function sfGetFileTree($dir) {
8    global $arrTree;
9
10    if(file_exists($dir)) {
11        if ($handle = opendir("$dir")) {
12            while (false !== ($item = readdir($handle))) {
13                if ($item != "." && $item != "..") {
14                    if (is_dir("$dir/$item")) {
15                        sfDeleteDir("$dir/$item");
16                    }
17                }
18                $cnt++;
19            }
20        }
21        closedir($handle);
22        $arrResult[$cnt]['file_name'] = "$dir/$item";
23    }
24
25    return $arrResult;
26}
27
28?>
Note: See TracBrowser for help on using the repository browser.