I know not to store images in the table, but to store them as files on the file system, but I have to work with what I have here, and what I have is an oracle table with jpegs stored as blobs. I need to display them in a table on a web page.
Here is what I have so far based on examples. But when I run it I get "broken" image placeholders.
I have also seen examples like this
but it also doesn't work for me. Can anybody point me to the right way to send a page full of images to a web page?
Here is what I have so far based on examples. But when I run it I get "broken" image placeholders.
PHP:
while ($row = oci_fetch_array($stid, OCI_ASSOC)){
echo "<tr><td>";
echo $row['OBJECT_FILE_NAME'];
echo "</td><td>";
echo $row['OBJECT_INSERTED_BY'];
echo "</td><td>";
echo '<img src="data:image/jpeg;base64,' . base64_encode( $row['OBJECT_BLOB'] ) . '" />';
echo "</td></tr>";
}
I have also seen examples like this
PHP:
echo header("Content-type: image/jpeg");
echo $row['image1'];
but it also doesn't work for me. Can anybody point me to the right way to send a page full of images to a web page?