开发者社区> 问答> 正文

php如何获取数据库中blob,然后将他显示到datagrid中?

现在php已经将图片存入到数据库中,类型blob。

     <?php
        $sql = "select pic from e_user where uid = '1dff5b51f862e6d181577e3ca34248be'";
        $js = get_js_object($sql);
        Header( "Content-type: image/png");
        echo $js->pic;  
        echo '<p><img src="../php/testlist.php" width="150"></p>'; 
?>

            <table class="easyui-dategrid" url="../php/testlist.php">
                 <thead>
                   <tr>
                        <th field="pic" width="120">图片</th> 
                    </tr>
            </thead>
    </table>

如何修改一下?

展开
收起
小旋风柴进 2016-03-06 13:11:13 2576 0
1 条回答
写回答
取消 提交回答
  • <table class="easyui-dategrid" url="../php/testlist.php">
    <thead>
    <tr>
        <th field="pic" width="120"><?php echo $js->pic;?></th> 
    </tr>
    </thead>
    </table>
    2019-07-17 18:54:24
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
阿里云栖开发者沙龙PHP技术专场-深入浅出网络编程与swoole内核-吴镇宇 立即下载
PHP安全开发:从白帽角度做安全 立即下载
PHP 2017.北京 全球开发者大会——高可用的PHP 立即下载