note 66304 deleted from function.getimagesize by mazzanet

From: Date: Mon, 28 Jan 2008 11:11:05 +0000
Subject: note 66304 deleted from function.getimagesize by mazzanet
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-135470@lists.php.net to get a copy of this message
Note Submitter: php at cNO_SOLICITATIONbreak dot org ---- Apparently appending $attr in the <img ...> tag will not render the image at all or render only a portion of the image under Safari and IE under certain circumstances. I haven't figured out the exact circumstances, but I'm using XHTML 1.0 Transitional DTD, and the circumstances seem to depend on the rendering order of the page. The problem is due to the width="..." attribute in general, not the height="..." attribute. To fix the problem, forget the $attr attribute and stick with the stylesheet: <?php list($w, $h) = getimagesize("image.jpg") ?> <img src="image.jpg" style="width: <?php=$w?>px; height: <?php=$h?>px;" />

« previous php.notes (#135470) next »