Posted by Jameson on 01/03/06 00:14
Hi Jim:
Thanks for the suggestion. I tried it out, but still got a blank
screen. I think Chung might be right, because if I try "<img
src="/Library/WebServer/Documents/uploads/door.jpg>" the web server
won't serve them. I think the client's browser is trying to find the
images locally on the HD.
Maybe what I'm trying to do isn't possible. Do you think using the
glob() function within the opendir() function might work?
Thanks for all of the help!
Jim Carlock wrote:
> "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.
Navigation:
[Reply to this message]
|