Full-service Internet Marketing & Web Development
Recent Posts

Sponsors
![]() |
Make an easy list of your photos by MBKCode Wizard, 12-30-2006 |
Just put this script somewhere and edit the $path variable to the path where the photos/images are you want to list.
It searches the dir for files with the extension jpg, gif and bmp. You can add more if you want.
Then it sorts 'm, and lists 'm.
<?
$path = "/the/path/with/your/photos/" ;
$d = dir("$path");
$count = 0;
while($entry=$d->read()) {
$file = explode(".", "$entry");
$extens = end($file);
$extens = strtolower ($extens);
if ($extens == "jpg" OR $extens == "gif" OR $extens == "bmp") {
$file[$count] = $entry;
$count++;
}
}
sort($file);
reset($file);
for ($i = 0; $i < $count; $i++) {
echo "<a href='$path/$file[$i]'>$file[$i]</a><br>";
}
?>
|
|
Subscribe Now to receive new posts via Email as soon as they come out.
Comments
Post your comments

