I am working with codeigniter
. I added an image
as blob
in database
and fetch it by using the below code
header('Content-Type: image/jpg');
$table="sample_table";
$select="photo";
$row=$this->common_mdl->fetch_array($table,$select,"","");
for($i=0;$i<count($row);$i++)
{
$st= pack("H*",$row[$i]['PHOTO']);
// $this->load->view('account/test1',$st);
}
echo $st;
The code works well. But when I try to echo some text on the same page, it didn't show anything, even the image didn't display.
Is there any way to display text with the same header, or is there any alternate method to do the same without header()
Any help colud be appreciated
Thank u in advance..