Displaying files, but hiding subdirectories
Posted: Sat Dec 27, 2003 1:16 am
Code: Select all
<?php
$folder = "\\saturnspot";
$link = 'http://24.197.74.135/saturnspot';
if ($handle = opendir($folder)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo "<a href="http://24.197.74.135/saturnspot/$file">$file</a><br><br>";
}
}
closedir($handle);
}
?>