경고 로그 캣 PHP로, 나는 로그 캣에서 이러한 노란색 경고를 얻을 : SingleClientConnManager의보내는 데이터는
잘못된 사용 : 여전히 할당 된 연결을
과 :
W/SingleClientConnManager (274) : 다른 하나를 할당하기 전에 연결을 해제해야합니다. 이 같은
내 코드 :
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);
nameValuePairs.add(new BasicNameValuePair("email", ""));
InputStream is=null;
try {
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://zzzzz.com/zzz.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
httpclient.execute(httppost);
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
is=entity.getContent();
} catch (IOException e) {
}
그리고 내 zzz.php에서
나는이 : 그런데<?php
$email = "aaa";
if (session_id() == "")
{
session_start();
}
if (!isset($_SESSION['username']))
{
header('Location: ./index.php');
exit;
}
else
{
$username = "******";
$password = "****";
$host = "****";
$database = "****";
$db = mysql_connect($host, $username, $password);
if (!$db)
{
die('Failed to connect to database server!<br>'.mysql_error());
}
else
{
mysql_select_db($database, $db) or die('Failed to select database<br>'.mysql_error());
mysql_query("UPDATE Users SET lat='".$email."' WHERE username='{$_SESSION['username']}'");
}
}
?>
, 내가는 mysql_query가되지 알고, 내가 그것을 변경할 수 있습니다. 코드 위의 아무튼 작동하지 않습니다. 나는 mysql에서 lat 값에 "aaa"를 쓰지 않는다는 것을 의미한다. 어디가 잘못 됐니?
브라우저로 노트북에 연결할 경우 error.It가 작동하지 않습니다.하지만 내 Android 휴대 전화와 연결하면 logcat에 경고가 표시됩니다. – Ozan