You are here: Re: problem displaying images as thumbnails « All PHP « IT news, forums, messages
Re: problem displaying images as thumbnails

Posted by Ian Davies on 10/18/05 23:00

Found it. Two problems

****************************************
$size = getimagesize($image);
***************************************
should be
*****************************************
$size = getimagesize($Image);
****************************************
case sensitive (silly me)

also in the table to display thumbnails
****************************************
<td rowspan="5" valign="top"><div align="left"><img src=<?php echo $Image;
?> width= <?php echo "$width"?> height= <?php echo "$height"?>>
*****************************************************************
should be
******************************************
<td rowspan="5" valign="top"><div align="left"><img src=<?php echo $Image;
?> width= "<?php echo $width?>" height= "<?php echo $height?>">
******************************************

Thanks for your help
Ian


"Ian Davies" <iandan.dav@virgin.net> wrote in message
news:4cc5f.64$65.27@newsfe6-win.ntli.net...
> Hello
> Here is part of the source viewed from the browser. It looks like the
> correct images are being found but it looks like the width and height
> variables are not working. I am new to php and despite trying a few
> alterations to the syntax am not having much luck.
>
> Also I am outputing the images themselves not the urls
>
> Ian
> ***********************************************************
> >
> </div></td>
> <td rowspan="5" valign="top">11&nbsp;</td>
> <td rowspan="5" valign="top">Metal plates were inserted into 3
shoot
> tips (below). Which shoot would grow to the right?</td>
> <td rowspan="5" valign="top"><div align="center"></div>
> Type answer (Diagram)</td>
> <td valign="top"><div align="left"></div> </td>
> <td rowspan="5" valign="top"><div align="left"><img
> src=images/PupilTester/PlantHormones.jpg width= height= >
> </div></td>
> "Oli Filth" <catch@olifilth.co.uk> wrote in message
> news:CWb5f.198$S_1.145@newsfe5-win.ntli.net...
> > Ian Davies said the following on 18/10/2005 20:14:
> > > Hello
> > > Im having problems displaying my images as thumbnails in a table. My
> code
> > > for producing the new width and height from the original image is as
> follows
> > <...SNIP CODE...>
> > >
> > > and in my table to display the thumbnail I have
> > >
> > > **************************************************************
> > > <td rowspan="5" valign="top"><div align="left"><img src=<?php echo
> $Image;
> > > ?> width= <?php echo "$width"?> height= <?php echo "$height"?>>
> > > </div></td>
> > > </tr>
> > > ****************************************************************
> > > However the images are not showing at all. The cells of the table are
> blank.
> > > But if I use
> > >
> > > *********************************************
> > > <td><img src=<?php echo $Image; ?>></td>
> > > </tr>
> > > *******************************************
> > > The images show full size as normal. Can anyone see where Ive gone
wrong
> > >
> >
> > Wouldn't the simplest thing to do be to look at the HTML source in the
> > browser, and ensure that the correct HTML is being output by PHP? If it
> > isn't, then correct PHP code accordingly...
> >
> >
> > --
> > Oli
>
>

 

Navigation:

[Reply to this 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

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