phpretard Posted February 15, 2009 Share Posted February 15, 2009 I can't really modify the headers... I would like to display it as an <img src="DBInfo"> tag instead. Is this even possible? The code below displays it fine but I am trying to display it as the website header and it give header errors <? ...connect header("Content-length: $size"); header("Content-type: $type"); header("Content-Disposition: attachment; filename=$name"); echo $content; ?> I would upload it straight to a file but... I have permission to Temp folder problems Link to comment https://forums.phpfreaks.com/topic/145331-image-from-blob/ Share on other sites More sharing options...
genericnumber1 Posted February 15, 2009 Share Posted February 15, 2009 If you just want to display an image (contained as binary in $content) you can simply do... <?php header('Content-type: image/jpeg'); // or whatever image type it is echo $content; Link to comment https://forums.phpfreaks.com/topic/145331-image-from-blob/#findComment-762950 Share on other sites More sharing options...
phpretard Posted February 15, 2009 Author Share Posted February 15, 2009 I can't modify the headers without error... Link to comment https://forums.phpfreaks.com/topic/145331-image-from-blob/#findComment-762953 Share on other sites More sharing options...
genericnumber1 Posted February 15, 2009 Share Posted February 15, 2009 Post your code, you cannot output anything before sending headers and you shouldn't need to, you're only outputting the image. Link to comment https://forums.phpfreaks.com/topic/145331-image-from-blob/#findComment-762956 Share on other sites More sharing options...
phpretard Posted February 15, 2009 Author Share Posted February 15, 2009 Believe me I know about the headers. I think I'll just try to deal with the permissions issue and upload it to a folder. Thanks Link to comment https://forums.phpfreaks.com/topic/145331-image-from-blob/#findComment-762965 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.