|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-11-14 10:36 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 13:00:01 2025 UTC |
Description: ------------ Hai, I have a set of coding which prints image from binary data stored in db. Actually the problem comes only when we print it between other outputs. The error is "headers are already sent...." . I have also tried buffering concept. If i use ob_start() and ob_end_flush() i couldn't get the image back. It is not printing anything.i couldn't help myself getting the work done. Please help me...Thanks in advance. Reproduce code: --------------- Here is the code //here some output statements $q = "select * from companyprof where userid=$id"; $v = $db->get_a_line($q); $image_type = $v["COMLogotype"];//image type $image = $v["COMLogo"];//binary data Header("Content-type: $image_type"); print $image; Expected result: ---------------- All I need is the image to be printed in the output.