[英]base64 encode image blob not showing in IE
echo '<img src="data:image/jpg/png/jpeg;base64,' . base64_encode( $row['image'] ) . '" height="150" />';
这显示的图像非常适合使用Firefox,Safari和Chrome浏览器,但是在Internet Explorer中,它会显示一个漂亮的红叉,我想是因为编码了吗?
Try replacing data:image/jpg/png/jpeg;
尝试替换data:image/jpg/png/jpeg;
with either data:image/jpeg;
带有data:image/jpeg;
or data:image/png;
或data:image/png;
depending on the format of the image. 取决于图像的格式。 You can't expect it to be both a PNG and a JPEG. 您不能期望它既是PNG 又是JPEG。
Most likely old IE or too big image for IE8. 最有可能是旧的IE或IE8的图像太大。
IE7 and below definitely don't support it. IE7及以下版本绝对不支持它。 IE9 support inline images just fine. IE9支持内联图像就可以了。 I IE8 have limited support. 我对IE8的支持有限。 - Check out http://en.wikipedia.org/wiki/Data_URI_scheme for list. -查看http://en.wikipedia.org/wiki/Data_URI_scheme以获得列表。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.