我的画廊需要帮助 [英] I need help with my gallery

查看:47
本文介绍了我的画廊需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

我还有另外一个问题,实际上是两个但是让我们从这个开始

一个:-)

我做了一个非常简单的画廊或至少我认为它很简单。

我已经制作了一个上传脚本,上传和调整图像大小

并创建缩略图。

现在我的文件夹是images / galleri /;和/images / galleri / thumbs。

现在是时候动态显示页面上的图像了。

我设置了$ filename变量来显示缩略图你可以

见下文,但如何设置$ filename_stor链接到大的
图片。也许即时通讯攻击这个问题都错了?我曾尝试过
在第一个地方筑巢另一个foreach但是这一切都搞砸了。


<?php

foreach (glob(''images / galleri / thumbs / *。jpg'')为$ filename){

echo''< td>< a href ="''。$ filename_stor。 '' "的rel =" milkbox []" < img

src ="''。$ filename。''" < / a>''。"& nbsp;& nbsp;< / td>" ;;

}

?>

第二个问题是我希望表格中的图像不超过6个字符串宽和N个行数。我以为我需要使用数组来节省费用!?


非常欢迎任何建议或解决方案

我希望你可以帮助我。


-Effix

解决方案

filename变量显示缩略图,你可以

见下文,但如何设置


filename_stor链接到大的
图像。也许即时通讯攻击这个问题都错了?我曾尝试过
在第一个地方筑巢另一个foreach但是这一切都搞砸了。


<?php

foreach (glob(''images / galleri / thumbs / *。jpg'')as


filename){

echo''< td>< a HREF =" ''

Hi everybody
I have yet another problem, actually two but lets start with this
one :-)
Im making a very simple gallery or at least I think its simple.
I have already made a upload script that uploads and resizes the image
and also creates a thumbnail.
So now I have my folder "images/galleri/" and "images/galleri/thumbs".
Now its time to dynamically display the images on a page.
I have set the $filename variable to display the thumbnails as you can
see below but how do I set the $filename_stor to link to the large
image. Perhaps im "attacking" this problem all wrong? I have tried to
nest another foreach in the first but that just messed everything up.

<?php
foreach (glob(''images/galleri/thumbs/*.jpg'') as $filename ) {
echo ''<td><a href="''.$filename_stor.''" rel="milkbox[]" <img
src="''.$filename.''" </a>''."&nbsp;&nbsp;</td>";
}
?>
The 2nd problem is that I want the images in a table that is no more
than 6 colums wide and N number of rows. Im thinking that I proberly
need to use an array!?

Any suggestions or solutions are very welcome
I hope you can help me.

-Effix

解决方案

filename variable to display the thumbnails as you can
see below but how do I set the


filename_stor to link to the large
image. Perhaps im "attacking" this problem all wrong? I have tried to
nest another foreach in the first but that just messed everything up.

<?php
foreach (glob(''images/galleri/thumbs/*.jpg'') as


filename ) {
echo ''<td><a href="''.


这篇关于我的画廊需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆