The Rhythmic Devil (divineright) wrote in php,
The Rhythmic Devil

Binary data

Hi all,
I have saved my images into a table as binary data. I can get it out again with the method that I found at phpbuilder. Here is the test code.

Header( "Content-type: image/jpeg");
echo $data;

The problem is that my real program pulls the images and text for the record and then displays it in an HTML page with tables and a bunch of other stuff. As soon as I added the Header line only the first image shows and thats it. I am assuming this has to do with HTTP headers and so forth which I am not entirely sure of. So if you could tell me how to display my binary image data or point to me some resources when I can learn how I would appreciate it.
  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.