noalyss Version-9
file-dir.php
Go to the documentation of this file.
1
2<?php
3$dir = "admin/";
4
5// Open a known directory, and proceed to read its contents
6if (is_dir($dir)) {
7 if ($dh = opendir($dir)) {
8 while (($file = readdir($dh)) !== false) {
9 echo "filename: $file : filetype: " . filetype($dir . $file) . "\n";
10 }
11 closedir($dh);
12 }
13}
14?>
15
$dir
Definition: file-dir.php:3