Reply to Re: Displaying Images form a Directory

Your name:

Reply:


Posted by Jim Carlock on 01/02/06 04:24

"Jameson" <jameson_ray@comcast.net> wrote:
> Thanks for the fast response. What I'm trying to do is
> actually display the images, not list them. What I've
> got so far (sorry for not posting this earlier) is:

Use witkey's suggestion with a modification?

<?php
// An Example about listing Images.
$dir = ".";
$odir = opendir($dir);
while($file = readdir($odir)){
if(filetype($file) == "image/JPEG") {
$sAltText = '"Whatever the alt text is if so required."';
echo '<img src="' . $dir . $file . ' border="0" alt="' . $sAltText . '" /><br />' . "\n";
}
?>

Jim Carlock
Post replies to the newsgroup.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация