Reply to Re: Building thumbnail page (mysql)

Your name:

Reply:


Posted by Krustov on 10/28/06 14:00

<comp.lang.php>
<Jane>
<Sat, 28 Oct 2006 14:53:39 +0200>
<ehvjs8$er8$1@localhost.localdomain>

> I need some help (php rookie) to build a thumbnail page using php.
> I'v a mysql database containing links to the original image files.
> No thumbnails created so far.
>
> It would be nice when the thumbnail contains a link to the original file :-)
>

Its usually better to scan the folder for image files , The following
doesnt create the thumbnails for you - but it will get you started .


<?php

$batman=0;

$dir="chatroom/images";
$joker=opendir($dir);
while (false!==($boywonder=readdir($joker)))
{
$files[]=$boywonder;
$batman=$batman+1;
}

$temp=0;
while ($temp<$batman)
{
$demo=$files[$temp];
$link="$dir" . "/" . "$demo";
print "<a href=$link>$demo</a><br>";
$temp=$temp+1;
}

?>


--
www.phpchatroom.co.uk

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация