Reputation: 5
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,,,,,
I did r&d.and tried the way in this url uploading files in android using emulator and localsystem
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?
Upvotes: 0
Views: 1079
Reputation: 6663
The URL http://localhost
is only valid on your computer. For Android to find the server, it will need a real url.
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
Upvotes: 2