且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Android 连接到本地主机

更新时间:2021-10-24 05:50:05

首先你要在eclipse设置中绑定你的服务器所在机器的IP地址.

First you have to bind the IP address of the machine where your server is running in the eclipse settings.

你可以这样做.

右键单击 Eclipse 中的 PHP 项目,然后运行配置,然后在 Web Application 中您将找到 Argument 选项卡.现在在这里给出运行服务器的机器的端口和 LAN IP 地址.

Right click on the PHP project in the eclipse then Run Configuration then In the Web Application where you will find the Argument tab. Now here give the port and LAN IP address of your machine on which your server is running.

类似这样的 --port=8888 --address=192.168.1.6 然后将 URL 更新为 http://192.168.1.6:8080/tests/PhpProject1/connectionBDD.php

Something like this --port=8888 --address=192.168.1.6 then update the URL to http://192.168.1.6:8080/tests/PhpProject1/connectionBDD.php

在我的情况下,这是我的 LAN IP 地址 192.168.1.6,您必须使用诸如 ipconfigifconfig 之类的网络命令找到它并使用该 IP地址.

Here in my case this is my LAN IP address 192.168.1.6, there you will have to find it using the network command like ipconfig , ifconfig and use that IP address.