Reputation: 2771
I have a php variable called $image which holds the contents of a medium blob from a mySQL server and I'm trying you output it using PHP5.
When I just use the code:
echo $image;
it just output a page full of ASCII characters. Does anyone have any suggestions? Thanks
Upvotes: 1
Views: 628
Reputation: 63502
Specify the correct Content-Type
header.
header('Content-Type: image/png');
echo $image;
Upvotes: 1