note 66304 added to function.getimagesize
| From: | php at cNO_SOLICITATIONbreak dot org | Date: | Thu, 18 May 2006 20:49:10 +0000 |
| Subject: | note 66304 added to function.getimagesize | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-111618@lists.php.net to get a copy of this message | ||
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;" />
----
Server IP: 216.194.113.175
Probable Submitter: 71.108.127.227
----
X-Spam-Status: Yes, hits=5.2 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER,
HTML_IMAGE_ONLY_04,HTML_MESSAGE autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.getimagesize.php
Edit -- http://master.php.net/note/edit/66304
Del: integrated -- http://master.php.net/note/delete/66304/integrated
Del: useless -- http://master.php.net/note/delete/66304/useless
Del: bad code -- http://master.php.net/note/delete/66304/bad+code
Del: spam -- http://master.php.net/note/delete/66304/spam
Del: non-english -- http://master.php.net/note/delete/66304/non-english
Del: in docs -- http://master.php.net/note/delete/66304/in+docs
Del: other reasons-- http://master.php.net/note/delete/66304
Reject -- http://master.php.net/note/reject/66304
Search -- http://master.php.net/manage/user-notes.php