i have been asked to a work where i have to insert images binaries in a database, (first i didn't understood i to insert a binary in db, when we can save only the path to the image), i have manage that, but the problem now is to show them.
First try:
i read the data from db and made a file in disk to access it.
this work's, but i don't see the point in having 2 binaries, and having to delete the image from disk later.
Second try:
make a image using GD.
the last two lines of code are
Code: Select all
<?php
header ("Content-type: image/png");
ImagePng ($img_handle);
?>i can see it if i don't have any other html in the page, but that's not what i want.
can someone help me with this?
there's another way to see the binaries from the db besides this two?