note 36299 added to function.readdir
| From: | cojaan64 at aol dot com | Date: | Sat, 04 Oct 2003 03:17:28 +0000 |
| Subject: | note 36299 added to function.readdir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-57792@lists.php.net to get a copy of this message | ||
Simple way to List a DIR files with links to them. And no . or ..
<?php
$dir="roms/";
if ($handle = opendir($dir)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
?><a href="<? echo "$dir$file"; ?>"><? echo
"$file"; ?></a><br><?
}
}
closedir($handle);
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.readdir.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+36299
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+36299&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+36299&report=yes
Search Tool -- http://master.php.net/manage/user-notes.php