I have 1 column containing binary format data. I want to display that Image on browser and I am useing codeignater
My Model Code
function GetLogoById($Id)
{
$this->load->database();
$query = $this->db->query( "EXEC GetLogoById '$Id'" );
$result = array();
foreach ($query->result() as $row)
{
$result[] = array("Logo"=> $row->Logo);
}
return $result;
}
My Controller Code:
public function GetLogoById()
{
$this->load->model('MyModel');
$result = $this->MyModel->GetLogoById($Id);
$result = base64_decode($result);
echo $result;
}
It return
in browse. What I am missing....