- Timestamp:
- 2006/11/21 14:56:56 (20 years ago)
- File:
-
- 1 edited
-
temp/trunk/html/test/uehara/test.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
temp/trunk/html/test/uehara/test.php
r8752 r8753 4 4 $cnt = 0; 5 5 print_r(sfGetFileTree("/home/web/test.ec-cube.net/html/user_data/")); 6 6 /* 7 7 function sfGetFileTree($dir) { 8 8 global $arrTree; … … 27 27 return $arrResult; 28 28 } 29 */ 30 31 function sfGetFileTree($dir) { 32 $arrResult = array(); 33 if(file_exists($dir)) { 34 // ¥Ç¥£¥ì¥¯¥È¥ê¤«¥Á¥§¥Ã¥¯ 35 if (is_dir($dir)) { 36 if ($handle = opendir("$dir")) { 37 $cnt = 0; 38 while (false !== ($item = readdir($handle))) { 39 if ($item != "." && $item != "..") { 40 if (is_dir("$dir/$item")) { 41 sfGetFileTree("$dir/$item"); 42 } else { 43 $arrResult[$cnt]['file_name'] = "$dir/$item"; 44 } 45 } 46 $cnt++; 47 } 48 } 49 closedir($handle); 50 $arrResult[$cnt]['file_name'] = "$dir/$item"; 51 } 52 } 53 54 return $arrResult; 55 } 56 29 57 30 58 ?>
Note: See TracChangeset
for help on using the changeset viewer.
