note 9202 added to is_file
| From: | rebel at windriders dot com | Date: | Sun, 22 Oct 2000 18:28:13 +0000 |
| Subject: | note 9202 added to is_file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-6829@lists.php.net to get a copy of this message | ||
I tried many ways to display files, here is a (cheesy but effective) workaround to using the
is_file function.
<?
$dir_name = "d:\php\examples";
$dir = opendir($dir_name);
while ($file_name = readdir($dir)) {
if (($file_name != "." && $file_name != "..")) {
print $file_name."<br>";
}
}
closedir($dir)
?>
http://www.php.net/manual/function.is-file.php