本文整理匯總了PHP中gallery::getImages方法的典型用法代碼示例。如果您正苦於以下問題:PHP gallery::getImages方法的具體用法?PHP gallery::getImages怎麽用?PHP gallery::getImages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類gallery
的用法示例。
在下文中一共展示了gallery::getImages方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: substr
<div class="row">
<h3>Gallerie fotografiche</h3>
</div>
<div class="row">
<?php
$string = file_get_contents("./json/photos.json");
$json_a = json_decode($string, true);
usort($json_a, 'sort_by_date');
foreach ($json_a as $ph => $photo) {
$data = $util->shortDate($photo['data']);
$folder = $photo['folder'];
$title = $photo['title'];
$gallery->setPath('./photos/' . $folder . '/');
//path to the image folder
$images = $gallery->getImages(array('jpg', 'png'));
//array of possible image extensions (useful if you have mixed galleries)
?>
<div class="col-xs-12">
<h4><?php
echo $title;
?>
<a name='<?php
echo $folder;
?>
'></a> (<?php
echo substr($data, strlen($data) - 9);
?>
)</h4>
<p><strong><?php
echo $photo['copyright'];