sigklphp 2015-01-17 02:22 采纳率: 75%
浏览 2707
已采纳

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>

如何修改一下?

  • 写回答

1条回答 默认 最新

  • ayzen1988 2015-01-17 02:46
    关注
    <table class="easyui-dategrid" url="../php/testlist.php">
    <thead>
    <tr>
        <th field="pic" width="120"><?php echo $js->pic;?></th> 
    </tr>
    </thead>
    </table>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?