displaying blob data from db |
[eluser]junaids[/eluser]
Hi, I am trying to display data from data base but getting an error. my function is, <?php Code: function getpic($id){ my url is.. http://localhost/codeigniter32/index.php/shop/getpic/1 and i am getting the error The image “http://localhost/codeigniter32/index.php/shop/getpic/1” cannot be displayed because it contains errors. The url in this error points correctly to the controller and function ..any help????
[eluser]Bhashkar Yadav[/eluser]
you need to set header for displaying image content like Code: header("Content-type: image/jpeg"); instead of Code: header("Content-type: image/jpg");
[eluser]vitoco[/eluser]
i don't know where i's defined the $field var , so this Code: print $result->$field; Code: print $result->content; Saludos |
Welcome Guest, Not a member yet? Register Sign In |