abelhermar Posted March 4, 2019 Share Posted March 4, 2019 I have a problem with visualize a image in web from Sybase. $select = "SELECT gImg FROM TIMG WHERE id=$id"; $rs = sybase_query($select , $link_connection); $row = sybase_fetch_assoc($rs); $img = $row['gImg']; header('Content-type: image/jpeg'); echo $img - The format of image in database is wmf. I don´t see the image in the web browser, I need some codification or function? Thank´s. PHP Version 5.3.5 Quote Link to comment https://forums.phpfreaks.com/topic/308423-sybase-select-img-from-php-sybase_query/ Share on other sites More sharing options...
Barand Posted March 4, 2019 Share Posted March 4, 2019 How are you attempting to display the image in the browser? Quote Link to comment https://forums.phpfreaks.com/topic/308423-sybase-select-img-from-php-sybase_query/#findComment-1565008 Share on other sites More sharing options...
abelhermar Posted March 5, 2019 Author Share Posted March 5, 2019 6 hours ago, Barand said: How are you attempting to display the image in the browser? I resolve this using a $img = hex2bin($row['gImg']); and display the image in browser: header('Content-type: image/jpeg'); print_r($img); Quote Link to comment https://forums.phpfreaks.com/topic/308423-sybase-select-img-from-php-sybase_query/#findComment-1565012 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.