CodeIgniter Forums
Still having problem displaying images in IE7 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Still having problem displaying images in IE7 (/thread-27635.html)



Still having problem displaying images in IE7 - El Forum - 02-16-2010

[eluser]Frank Rocco[/eluser]
Hello,

Here is the code I use to display an image ina blob.
Code:
<?php print base64_encode($row->Picture)?>

IE 8 works fine, IE7 fails.

Is there a better way to show an image stored in a blob?

Thanks

Frank


Still having problem displaying images in IE7 - El Forum - 02-17-2010

[eluser]xeroblast[/eluser]
try this:

in your controller
Quote:<?php
function showPicture()
{
header("Content-type: image/jpeg");
echo $row->Picture;
}
?>

in your view
Quote:<img src="&lt;?php echo site_url('controller_name/showPicture'); ?&gt;" />