我来自德国抱歉我的英语不好。我正在编写一个android来控制一个Java项目的用户...问题是我的应用程序不想连接到网站。代码:
public function getOutput($text){
.
.
.
}
答案 0 :(得分:0)
试试这个:
URL url = new URL("http://192.168.178.56/app/AddUser.php?user="
+userb.getText().toString());
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
try {
InputStream in = new BufferedInputStream(urlConnection.getInputStream());
readStream(in);
} finally {
urlConnection.disconnect();
}