CodeIgniter Forums
display blob data - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: display blob data (/showthread.php?tid=53204)



display blob data - El Forum - 07-14-2012

[eluser]Unknown[/eluser]
I am writing this code :

<?php foreach($daftargambar->result() as $row){
$filename = $row->file_name;
$mime_type = $row->mime_type;
$filedata = $row->file_data;
header("content-disposition: inline; filename=$filename");
header("content-type: image/jpeg");
header("content-length: ".strlen($filedata));
echo ($filedata);

}
I have message like this :
The image "http://localhost/blogci/index.php/cgambar cannot be displayed because it contanins error"

anybody have the same experience ? , help me , help me. Thaks


display blob data - El Forum - 07-15-2012

[eluser]john_j[/eluser]
Most browsers have a developer tool. Use that to get more details about the error thrown.