You can calculate the image size when adding the image (rather than when displaying it) and store the information in a file or a database. This file or database you could use for posting the right sizes for popup windows.
Sascha Am Montag, 7. Oktober 2002 03:22 schrieb arnaud gonzales: > So my code is clean ? There isn't a problem of infiny loop? > My server is free.fr. > How do u suggest i can cach the data? > > -----Message d'origine----- > De : Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] > Envoye : lundi 7 octobre 2002 03:07 > A : arnaud gonzales > Cc : Php-General > Objet : Re: [PHP] getimagesize or loop pblm > > > It could take a while. Depends how fast your server's disk sub-system is. > Going to disk to stat and open an image and then parse through the initial > headers to get the sizing data can take some time. I'd suggest caching > this data somewhere if you are going to need it on every request. > > -Rasmus > > On Mon, 7 Oct 2002, arnaud gonzales wrote: > > Hi all, > > Does anybody can tell me why i have this error :"Fatal error: Maximum > > execution time of 5 seconds exceeded in photos2.php on line 28" > > whith this > > > > > > $tab_img = array(); > > $tab_img_size = array(); > > for($i=0;$i=56;$i++){ > > $tab_img[$i] = >"images/tof/real_size/techp02_".$i.".jpg"; > > $tab_img_size = array( > > /* line 28 */ $i => getimagesize($tab_img[$i])); > > } > > > > Is the getimagesize function too long for making it 56 times?? > > What do u think ? > > In fact i want to get all the image size to make a popup link on the > > thumnail at the real size of the image.Because images don't have the same > > size and i want to have a clean window whith the popup. > > I've ever tried this before : > > > > $tab_img = array(); > > $tab_img_size = array(); > > for($i=0;$i=56;$i++){ > > $tab_img[$i] = >"images/tof/real_size/techp02_".$i.".jpg"; > > $tab_img_size[$i] = getimagesize($tab_img[$i]); > > } > > Hope you understand. > > TIA. > > zeg > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php