Mod-Jay Posted April 24, 2011 Share Posted April 24, 2011 I have no idea whats wrong with this. I'm trying to make it so i can collect all the .jpg images in a the $servername's folder to display as a thumbnail set up with javascript and css. <?php if(!empty($images)) { ?> <div class="highslide-gallery"> <?php $pic_listing = mysql_query("SELECT * FROM toplist WHERE id='". $id ."'") or die(mysql_error()); while($serverpic = mysql_fetch_array($pic_listing)) { // $picture1 = $serverpic["picture1"]; // $picture1info = $serverpic["picture1info"]; $servername = $serverpic["servername"]; } $directory = "images/serverpic/" . $servername . ""; $images = glob("" . $directory . "*.jpg"); foreach($images as $image) { ?> <a href="images/serverpic/<?php echo $servername . "/" . $image; ?>" class="highslide" onclick="return hs.expand(this)"> <img src="images/serverpic/<?php echo $servername . "/" . $image; ?>" alt="Highslide JS" width="100" height="100" title="Click to enlarge" /> </a> <div class="highslide-caption"> <?php } // echo $picture1info; ?> </div> <?php ?> </div> <?php } ?> Link to comment https://forums.phpfreaks.com/topic/234564-get-file-error/ Share on other sites More sharing options...
requinix Posted April 24, 2011 Share Posted April 24, 2011 Print out the value of $directory. Fix that bug. Then print out the values of $image and fix the other bug. Link to comment https://forums.phpfreaks.com/topic/234564-get-file-error/#findComment-1205469 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.