问题上传图像到Android应用程序在本地主机 [英] Issue in uploading image to a local host in android application

查看:106
本文介绍了问题上传图像到Android应用程序在本地主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个Android应用程序,其中我要上传图片到本地主机,我创建了一个数据库,也把php文件,,,,,

I am developing an android application, in which I have to upload image to a local host, I have created a database, also put the php file,,,,,

我做R&放大器; d.and在此URL尝试的方式
<一href=\"http://stackoverflow.com/questions/5375227/uploading-files-in-android-using-emulator-and-localsystem\">uploading在Android的文件中使用仿真器和本地系统

I did r&d.and tried the way in this url uploading files in android using emulator and localsystem

但没有获得成功.....我的本地主机地址是的http://localhost/connect1.php

But did not get success..... My localhost url is http://localhost/connect1.php

任何人都可以指导我如何上传图片到本地主机?

Can anyone guide me how to upload image to a local host?

推荐答案

该网址的http://本地主机仅在您的计算机上有效。为Android找到服务器,它需要一个真正的URL。

The URL http://localhost is only valid on your computer. For Android to find the server, it will need a real url.

有关的发展,如果你没有一个官方网址暂时还,你可以把你的本地无线网络上您的手机和使用本地网络服务器的IP地址。要获取IP地址,运行 IPCONFIG (Windows)或使用ifconfig (Linux版)。因此,您的网址将会像 http://10.23.234.12/connect1.php

For development, if you don't have an official URL yet, you can put your phone on your local wireless network and use the IP address of your local webserver. To get the ip address run ipconfig (windows) or ifconfig (linux). So your url will be something like http://10.23.234.12/connect1.php

这篇关于问题上传图像到Android应用程序在本地主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆