0

I'm new to android programming so please I need your help I want to make a mobile application that connects to a databse on my laptop through internet without configuring my router I'm using phpmyadmin in which i created a database, and I made a file called login.php that can make sure of username and password from database I enabled the port 80 in firewall now i wrote in eclipse this url : http:"//192.168.1.3:80/Day%20Manager/Login.php" the ip address is optained by writing ipconfig in cmd and getting the IPV4 address well it's not working it's giving me NetworkOnMainThreadException can you help me please

4

2 回答 2

1

看看这个链接。这可能会有所帮助。当然,如果您需要从应用程序中访问它,则必须提供一个中间 php 脚本才能使其正常工作。

于 2012-12-28T16:55:35.040 回答
0

你说你正在使用 phpmyadmin 数据库,然后将你的 php 文件放在 c:/>xampp/htdocs 文件夹中,打开你的浏览器并输入 localhost/login.php 然后你会得到输出,以同样的方式从程序连接到 url 然后你会得到数据。

note: make sure internet permission in manifest file.
于 2012-12-28T18:15:42.003 回答