如何使用 google gear 在特定文件夹中创建数据库?
当我们使用任何 gear 启用站点时,我们会离线 gear 自动创建带有 /dbName#database 的文件夹...
假设有 2 个差异。网站有 www.abc.com 和 www.xyz.com。
当我在 www.abc.com 上网时,它应该创建像 /abcxyz/dbName#database 这样的文件夹,对于 www.xyz.com 来说,它也应该创建像 /abcxyz/dbName#database 这样的文件夹。所以我的意思是两个网站都应该使用相同的 SQLite 数据库。
如果可能的话,请给我发送一些示例代码,了解如何使用齿轮代码实现此目的。
任何帮助将不胜感激...
When we are using any gear enable site, and we go offline the gear automatically creating folder with /dbName#database ...
assume 2 diff. website is there www.abc.com and www.xyz.com.
when I go online in www.abc.com it should create folder like /abcxyz/dbName#database, And same for www.xyz.com it should also create folder like /abcxyz/dbName#database. So what I mean is both the website should use same SQLite Database.
If this is possible please send me some example code how to achieve this with gear code.
Any help will be appreciated ...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
上次我检查时,你不能这样做:我很确定这与安全问题有关同源政策。
由于站点不应该访问其他站点的资源,因此在此 API 级别公开额外的自由度确实没有意义。此外,这会给 WEB 应用程序带来什么价值?我只能真正满足客户端主机端的需求,这对于 Gears 来说并不是真正的优先事项。
The last time I checked, you couldn't do that: I am pretty sure it is related to security concerns & same origin policy.
Since a site isn't supposed to have access to resources of other sites, I really doesn't make sense to expose additional degrees of liberty at this API level. Furthermore, what value would that confer to the WEB application? I could only really serve the needs on the client host side which is not really a priority for Gears.