|
How to make links using folder content?
I have a php page that takes in a list of files (image files) from a directory and lists them. I wanted to know is there a way for me to create links using this list? Here is my code.
<?php
$dir = "testimages/";
// Open a known directory, and proceed to read its contents
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
print "$file";
print "<br>";
}
closedir($dh);
}
}
?>
__________________
"Knowledge Speaks But Wisdom Listens"
Last edited by Bengal313; 12-12-2003 at 08:14 PM..
|