我的花哨的盒子出了问题,我正在使用2个foreach循环遍历我的文件夹并循环图像,由于某些原因,使用循环我的花式框不起作用但没有使用它做的循环工作..
这是我的代码:
<div class="container">
<div class="row">
<div class="col-md-12">
<?php
$folderGlob = glob("gallery/2015/*/");
foreach ($folderGlob as $folder){
?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><?php echo $folder; ?></h3>
</div>
<div class="panel-body">
<?php
$fileGlob = glob($folder . "*.{jpg,png,gif}", GLOB_BRACE);
foreach ($fileGlob as $file):
$basename = basename($file, ".jpg");
$date = current(explode("_", $basename));
?>
<div class="col-md-4" style="padding-bottom: 15px;">
<a class="fancybox-effects-d" href="<?php echo $file; ?>" title="<?php echo $date . ' januari 2015'; ?>">
<img class="img-responsive" src="<?php echo $file; ?>" alt=""/>
</a>
</div>
<?php
endforeach;
?>
</div>
<div class="panel-footer">
</div>
</div>
<?php
}
?>
</div>
</div>
</div>
我不知道我做错了什么..