当前位置: 首页>>代码示例>>PHP>>正文


PHP gallery::setPath方法代码示例

本文整理汇总了PHP中gallery::setPath方法的典型用法代码示例。如果您正苦于以下问题:PHP gallery::setPath方法的具体用法?PHP gallery::setPath怎么用?PHP gallery::setPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gallery的用法示例。


在下文中一共展示了gallery::setPath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: substr

?>
        </div>

        <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>
开发者ID:cbolk,项目名称:renbukai-website,代码行数:31,代码来源:gallery.php

示例2: sort_by_date

date_default_timezone_set('Europe/Rome');
include "./utils/class.utils.php";
include "./utils/class.seminar.php";
include "./utils/class.gallery.php";
function sort_by_date($a, $b)
{
    $dA = strtotime($a['data']);
    $dB = strtotime($b['data']);
    return $dB - $dA;
}
$util = new utils();
$s = new seminar();
$s->setSource("./seminari.json");
$gallery = new gallery();
$data = $util->shortDate($json_a[0]['data']);
$gallery->setPath('./stages/');
//path to the image folder
$image = $gallery->getImages(array('jpg', 'png', 'gif'));
//array of possible image extensions
?>
<html>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>associazione renbukai</title>
    <link rel="apple-touch-icon-precomposed" href="assets/favicon_t.png" />
    <link rel="shortcut icon" href="assets/favicon.png">
    <!-- bootstrap -->
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
    <link rel="stylesheet" href="//blueimp.github.io/Gallery/css/blueimp-gallery.min.css">
    <link rel="stylesheet" href="css/bootstrap-image-gallery.min.css">
开发者ID:cbolk,项目名称:renbukai-website,代码行数:31,代码来源:seminar_new.php


注:本文中的gallery::setPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。