|
Posted by Jameson on 01/02/06 02:53
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:
<?php
echo "<table><tr>";
foreach(glob("uploads/*.{jpg,JPG,jpeg,JPEG,gif,GIF,png,PNG}",
GLOB_BRACE) as $images)
{
echo "<td><img src=\"".$images."\"><br/>";
}
echo "</tr></table>";
?>
It works just fine if I want to view images in the "uploads/" folder
(which is parallel to this script), but if I want to change it to be
"/Volumes/jray/Pictures" it won't work.
witkey wrote:
> <?php
> // An Example about listing Images.
> $dir = ".";
> $odir = opendir($dir);
> while($file = readdir($odir)){
> if(filetype($file) == "image/JPEG") {
> echo $file;
> }
> ?>
Navigation:
[Reply to this message]
|