當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Gallery::getImages方法代碼示例

本文整理匯總了PHP中Gallery::getImages方法的典型用法代碼示例。如果您正苦於以下問題:PHP Gallery::getImages方法的具體用法?PHP Gallery::getImages怎麽用?PHP Gallery::getImages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Gallery的用法示例。


在下文中一共展示了Gallery::getImages方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Gallery

<?php

require 'php/gallery.php';
$id = $_POST['id'];
$gallery = new Gallery();
if ($id != 'null' && $id != null) {
    $images = $gallery->getImages();
    $amountImages = sizeof($images);
    echo $amountImages;
    ?>
	<h1>Test</h1>
	<p class="galery"><a href="javascript: getImages(null)">Zurück zur Übersicht</a></p>
	<?php 
    if ($amountImages > 0) {
        foreach ($images as $image) {
            echo '<div class="galery"><a href="./' . $image . '" rel="lightbox["1"]"><img src="./' . $image . '" class="galery" /></a></div>';
        }
    } else {
        echo 'Galerie ist noch leer!';
    }
}
開發者ID:nxnc,項目名稱:WPF_MW,代碼行數:21,代碼來源:text.php

示例2: Gallery

<?php

require 'includes/gallery.php';
$gallery = new Gallery();
$gallery->setPath('gallery/includes/uploads');
$images = $gallery->getImages(array('jpg'));
?>

<html>
<head>
	<title>Image Gallery</title>
	<link rel="stylesheet" href="assets/css/gallery.css">
</head>
<body>
	<form action="upload.php" method="post" enctype="multipart/form-data">
		<input type="file" name="file">
		<input type="submit" value="upload">
	</form>

	<div class="container">
		<?php 
if ($images) {
    ?>
			<div class="gallery clearfix">
				<?php 
    foreach ($images as $image) {
        ?>
					<div class="gallery-item">
						<a href="<?php 
        echo $image['full'];
        ?>
開發者ID:shep1990,項目名稱:PHP-Gallery,代碼行數:31,代碼來源:index.php

示例3: Gallery

<?php

require 'gallery.php';
$gallery = new Gallery();
$gallery->setPath('img');
//path to the image folder
$images = $gallery->getImages(array('JPG', 'PNG', 'jpg'));
//array of possible image extensions (useful if you have mixed galleries)
$row_counter = 0;
//don't change that
$img_no_caption = " ";
//default caption for image that don't have one
$img_no_date = $page_title = "PHP-Gallery";
//changes the <title> attribute AND the logo in top left corner
$no_images_warning = "Ooops! No images in gallery!";
//Display the text when $gallery->setPath directory is empty.
$col_md_x = 6;
//Bootstrap - choose either 2,3,4 or 6 to have 6,4,3 or 2 pics per line respectively
//----------------------------------------------
$row_x = 12 / $col_md_x;
?>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title><?php 
echo $page_title;
?>
</title>
    <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
開發者ID:kho226,項目名稱:PHP_gallery,代碼行數:31,代碼來源:index.php


注:本文中的Gallery::getImages方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。