| <?php | |
| foreach($_GLOBALS as $variable => $value) { | |
| echo "Variable Name: " . $variable . " Value: $value<br>"; | |
| } | |
| $dir = $_GET[dir]."/"; | |
| echo("reading dir: ".$dir."<p>"); | |
| if (is_dir($dir)) { | |
| if ($handle = opendir($dir)) { | |
| while (($file = readdir($handle)) !== false) { | |
| echo $file; | |
| if (is_dir($dir . $file)) | |
| echo "/"; | |
| echo "<br>"; | |
| } | |
| closedir($handle); | |
| } | |
| } | |
| ?> |