Converting image datatype from Sql Server to php -
i'm trying show image saved sql server database php page creating. i've done far necessary data database, image , , image type(if jpg).
this did:
$idata = base64_decode($imageresult); imagejpeg($idata);
but showing error of following:
imagejpeg() expects parameter 1 resource, string given [app\controller\maincontroller.php, line 226]
how make image show inside php? need decode data i'm getting database before convert it?
i want give example data have sensitive, why don't know how give example.
use imagecreatefromstring
function: http://www.php.net/manual/en/function.imagecreatefromstring.php
$idata = base64_decode($imageresult); $image = imagecreatefromstring($idata) imagejpeg($image);
Comments
Post a Comment