我真的不知道该怎么办。帮助将不胜感激!谢谢。
function handleVerChk($arrData, Client $objClient){
$objClient->sendData('<msg t="sys"><body action="apiOK" r="0"></body></msg>');
}
function handleLogin($arrData, Client $objClient){
$strUser = $arrData['body']['login']['nick'];
$strPass = $arrData['body']['login']['pword'];
Silk\Logger::Log('Client is attempting to login with username \'' . $strUser . '\'');
$blnExist = $this->objDatabase->playerExists($strUser);
if($blnExist === false){
$objClient->sendError(100);
return $this->removeClient($objClient->resSocket);{
elseif($arrUser["Banned"] == 1)
$objClient->sendError(603);
return $this->removeClient($objClient->resSocket);
}
}
答案 0 :(得分:0)
将功能更改为此会出现一些错误
function handleLogin($arrData, Client $objClient){
$strUser = $arrData['body']['login']['nick'];
$strPass = $arrData['body']['login']['pword'];
Silk\Logger::Log('Client is attempting to login with username \'' . $strUser . '\'');
$blnExist = $this->objDatabase->playerExists($strUser);
if($blnExist === false){
$objClient->sendError(100);
return $this->removeClient($objClient->resSocket);
} elseif($arrUser["Banned"] == 1){
$objClient->sendError(603);
return $this->removeClient($objClient->resSocket);
}
}