本文整理汇总了PHP中Photograph::image_path方法的典型用法代码示例。如果您正苦于以下问题:PHP Photograph::image_path方法的具体用法?PHP Photograph::image_path怎么用?PHP Photograph::image_path使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Photograph
的用法示例。
在下文中一共展示了Photograph::image_path方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<br><br><br>
<div class="container padding2">
<?php
$photos = Photograph::find_all();
$row = "<div class=\"row\" >";
$counter = 0;
foreach ($photos as $photo) {
if ($counter === 0) {
echo $row . "<hr>";
}
echo "<div class=\"col-md-3\">";
?>
<p class='padding'> <img src="<?php
echo $photo->image_path();
?>
" class="img-rounded img-responsive" style="width:200px; height:160px";/>
<?php
echo "<br>" . "<pre>" . $photo->filename . "</pre>";
echo "<div class=\"col-md-6 btn-danger\"><a style='color: #ffffff' href='delete_item.php?id={$photo->id}'>Delete</a></div>";
echo "<div class=\"col-md-6 btn-default \"><a style=\"color: #080808 \" href='#'>Edit</a></div>";
echo "<div style=\"line-height: 70%\" > </div>";
echo "<div class=' panel panel-default '><div class=' panel-body '> " . nl2br(strip_tags($photo->caption)) . "<br></div></div></p>";
echo "</div>";
if ($counter === 3) {
$counter = 0;
echo "</div>";
} else {
$counter++;
}