Java 如何使用Android将图像上传到数据库?
我想知道谁使用AsyncTask将图像插入数据库 这是我的Java代码:Java 如何使用Android将图像上传到数据库?,java,php,android,json,android-asynctask,Java,Php,Android,Json,Android Asynctask,我想知道谁使用AsyncTask将图像插入数据库 这是我的Java代码: protected String doInBackground(String... params) { ........ List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); nameValuePairs.add(new BasicNameValu
protected String doInBackground(String... params) {
........
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("image", image));
图像路径不保存和图像不保存到文件夹
如果我转到我在邮递员提交图像中测试的url_图像,则出现服务器错误
找不到
The requested URL /admin/news/d41d8cd98f00b204e9800998ecf8427e.png was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
要知道谁使用AsyncTask将图像插入数据库…
。这是不可能的。使用Android上的异步任务,您可以将图像上载到php脚本。php脚本如何处理图像取决于您。实际上,脚本可以将图像放入数据库中。但它也可以用它做其他事情。请重新格式化您的帖子。我收到错误数组([type]=>2[message]=>file\u put\u contents(news/d41d8cd98f00b204e980998ecf8427e.png):无法打开流:没有这样的文件或目录[file]=>/home/futegolo/public\u html/insertedimage.php[line]=>58)您的图像已上载要知道使用AsyncTask向数据库插入图像的人…
。这是不可能的。使用Android上的异步任务,您可以将图像上载到php脚本。php脚本如何处理图像取决于您。实际上,脚本可以将图像放入数据库中。但它也可以用它做其他事情。请重新格式化您的帖子。我收到错误数组([type]=>2[message]=>file\u put\u contents(news/d41d8cd98f00b204e980998ecf8427e.png):无法打开流:没有这样的文件或目录[file]=>/home/futegolo/public\u html/insertedimage.php[line]=>58)您的图像已上载?
The requested URL /admin/news/d41d8cd98f00b204e9800998ecf8427e.png was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.