while($row = mysql_fetch_array($rs))
{
$first = true;
$fldr = $row["fldr"];
$ttle = $row["title"];
$directory = "admin/uploads/$fldr/";
$images = glob($directory . "*.JPG");
$im="";
$html="<div class='col-md-3 gallry'><ul class='gallery clearfix'>";
foreach($images as $image)
{
if ( $first ){
$first = false;
$html .= "<li><a href='admin/uploads/$fldr/$image' rel='prettyPhoto[gallery1]' title=''><img src='admin/uploads/$fldr/$image' class='img-responsive' alt='' /></a></li>";
}
else
{
$html .= "<li><a href='admin/uploads/$fldr/$image' rel='prettyPhoto[gallery1]' title='' style='display:none;'></a></li>";
}
$im = $image;
}
$html .= "</ul><h6>$im</h6></div>";
}
图片无法加载。我需要访问images目录并将其加载到li
标签。如果有人知道如何帮助我..