doucan8521 2016-04-22 01:06
浏览 18

phpLiteAdmin - 添加图像

An application I am presently working on requires an SQLite database. As I will not be the one actually maintaining the database I believe it would be tremendously beneficial to use a tool such phpLiteAdmin. However, I need a way to store an image as a blob in the table (I know there are some pitfalls with storing the actual image data in the database, but for my purposes I believe it is the best approach). Is there any way to do so with a GUI tool such as phpLiteAdmin or not? Could I somehow write a custom function to implement this behavior if it is available by default?

Thanks so much!

  • 写回答

3条回答 默认 最新

  • doulu5717 2016-04-22 02:13
    关注

    As alternative, you could store image's file name in a char type column. For example, there is a column img_filename in your table. Then you can simply show the image in HTML with <img src='...'> tag:

    <?php
    
    // your database query here
    // ...
    
    print "<img src='".$row['img_filename']."' />"
    
    
    ?>
    
    评论

报告相同问题?

悬赏问题

  • ¥50 我撰写的python爬虫爬不了 要爬的网址有反爬机制
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法