当我连接到我的服务器时,我在 java 代码中显示它的地址,如下所示:
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://192.168.1.13/spotnshare/syncAddress.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
但是我们告诉我,代码中的 IP 地址是不正确的,我猜我应该把它作为别名放在配置文件中。
有人知道吗?