[英]In HTML5 JavaScript, how do I read a BLOB field from an Sqlite database and use it as content in my web app?
An example would be very helpful.一个例子会很有帮助。 I've been handed a Sqlite db with images in it and I have to get them, then use them in my webOS app (it just JavaScript:-))
我收到了一个 Sqlite 数据库,里面有图像,我必须得到它们,然后在我的 webOS 应用程序中使用它们(它只是 JavaScript:-))
I know how to get an sql record, but how do I use the BLOB data?我知道如何获取 sql 记录,但如何使用 BLOB 数据?
Are you using any server-side scripts?您是否使用任何服务器端脚本? If so, you can create a file (eg image.php) that fetches and outputs the BLOB data depending on the GET parameters.
如果是这样,您可以创建一个文件(例如 image.php),根据 GET 参数获取和输出 BLOB 数据。 Then in your HTML, you would have
<img src="image.php?id=11" />
然后在您的 HTML 中,您将拥有
<img src="image.php?id=11" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.