且构网

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

Android - 尝试连接到本地服务器时出错(Xampp)

更新时间:2022-11-05 18:25:47

由于模拟器和笔记本的本地主机不同,您需要做以下操作:

Since local host for Emulator and Laptop is different, you need to do following:

  1. 使用笔记本电脑命令提示符中的 ipconfig 命令获取 PC 的 IP 地址.
  2. 您应该在 URL 中使用 ipAddress,而不是使用 localhost.
  1. Get the IP address of your PC using: ipconfig command in your Laptop's command prompt.
  2. Instead of using localhost, you should use ipAddress in your URL.

所以您的地址将变为:http://<ip地址>/lotus/getstats.php?category=ATM