Index: temp/trunk/html/test/uehara/test.php
===================================================================
--- temp/trunk/html/test/uehara/test.php	(revision 8752)
+++ temp/trunk/html/test/uehara/test.php	(revision 8753)
@@ -4,5 +4,5 @@
 $cnt = 0;
 print_r(sfGetFileTree("/home/web/test.ec-cube.net/html/user_data/"));
-
+/*
 function sfGetFileTree($dir) {
 	global $arrTree;
@@ -27,4 +27,32 @@
 	return $arrResult;
 }
+*/
+
+function sfGetFileTree($dir) {
+	$arrResult = array();
+	if(file_exists($dir)) {
+		// ¥Ç¥£¥ì¥¯¥È¥ê¤«¥Á¥§¥Ã¥¯
+		if (is_dir($dir)) {
+			if ($handle = opendir("$dir")) {
+				$cnt = 0;
+				while (false !== ($item = readdir($handle))) {
+					if ($item != "." && $item != "..") {
+						if (is_dir("$dir/$item")) {
+							sfGetFileTree("$dir/$item");
+						} else {
+							$arrResult[$cnt]['file_name'] = "$dir/$item";
+						}
+					}
+					$cnt++;
+				}
+			}
+			closedir($handle);
+			$arrResult[$cnt]['file_name'] = "$dir/$item";
+		}
+	}
+
+	return $arrResult;
+}
+
 
 ?>
