Friday, 15 January 2010

php - Display images stored in a database without using header -



php - Display images stored in a database without using header -

i photo maintain stored in view using next code problem can not play because need header('content-type: image/jpeg'); implementation display., have orders sure before header('content-type: image/jpeg'); should display images no header.

if you're outputting image, doesn't matter if have other php instructions before since output should image.

if trying output image straight html document, consider using info uri:

<img src="data:image/jpeg;base64,<?php echo base64_encode($imagedata); ?>" />

php mime-types content-type

No comments:

Post a Comment