gpt4 book ai didi

php - Android - 将sqlite数据和照片上传到服务器

转载 作者:行者123 更新时间:2023-11-29 21:56:18 25 4
gpt4 key购买 nike

你好,我有几个问题。

我有一个应用程序可以存储用户登录或注销时的日志数据。登录或注销后,系统会提示用户拍摄照片并将其存储在具有自定义文件名的自定义文件夹中。有关时间戳、文件名、房间、文件路径等的数据存储在 SQLite 数据库中。我知道它存储正确,因为我能够在 ListView 中正确查看结果。

第二步是将上述数据库连同照片一起上传到在线服务器(我猜是 CPanel 之类的东西)。在这里,我得到的印象是我需要导出 SQLite 数据库并上传它。上述文件夹中的照片也是如此。

所以这是我的问题:

  1. 导出 SQLite 数据库的最佳方式是什么,同时要记住它将被上传到在线服务器?我知道可以将 SQLite 导出为 CSV,但是否可以将 SQLite 数据库导出为查询?
  2. 是否可以将照片从智能手机上的文件夹上传到服务器上的另一个文件夹?
  3. 我是否需要编写一些后端 php 脚本来搞砸数据库和照片上传到服务器的方式?

谢谢。

最佳答案

What is the best way of exporting an SQLite database keeping in mind that it will be uploaded to an online server?

将数据而不是数据库本身上传到您的网络服务器。这可以使用 RESTful 网络服务来完成。

I know it is possible to export the SQLite as CSV, but is it possible to export the SQLite database as queries?

是的,这是可能的,但您必须生成自己的 SQL 查询,因为 SQLite 方言与 MySQL 方言不同。

Is it possible to upload photos from a folder on the smartphone to another folder in the server?

是的,这是可能的。使用 Web 服务/FTP 服务器/HTTP 文件服务器

Will I need to do some back end php scripting in order to to screw up the way the database and photos are uploaded into the server?

是的,您需要一个网络服务来为您完成这些任务。

关于php - Android - 将sqlite数据和照片上传到服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13151138/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com