OLD | NEW |
1 <?php | 1 <?php |
2 | 2 |
3 function getGeneratedFiles($dir, &$results = array()) | 3 require_once('test.pb.php'); |
4 { | 4 require_once('test_util.php'); |
5 $files = scandir($dir); | |
6 | |
7 foreach ($files as $key => $value) { | |
8 $path = realpath($dir.DIRECTORY_SEPARATOR.$value); | |
9 if (!is_dir($path)) { | |
10 $results[] = $path; | |
11 } else if ($value != "." && $value != "..") { | |
12 getGeneratedFiles($path, $results); | |
13 } | |
14 } | |
15 return $results; | |
16 } | |
17 | |
18 foreach (getGeneratedFiles("generated") as $filename) | |
19 { | |
20 if (!is_dir($filename)) { | |
21 include_once $filename; | |
22 } | |
23 | |
24 } | |
25 | |
OLD | NEW |