这是我的代码的一部分:
if(!isset($_GET['username']) || !isset($_GET['sessionid']))
{
$returning = array('error' => 'Invalid query');
echo json_encode($returning);
break;
}
echo $_GET['username'];
$z = mysql_real_escape_string($_GET['username']);
echo $z;
我的查询:
tymonradzik.pl/THUNDER_HUNTER/thapi.php?q=xxx&username=ty221&sessionid=JRHjYqeZKBPq1LPPck0XrnCwJU2UKnfufWNem1d7D3yEOnu0HvX9SAFCuIxe6MImJwA6xNdbQLPF9kGRPE0IeGkJoRXvEGRncrtKfGV6sLLB5stVUQ6s
它只返回“ty221”,但应该返回“ty221ty221”。错误在哪里?