检查来自php脚本C ++的响应

时间:2018-08-08 20:53:41

标签: php c++

我试图从数据库中的表中获取盐分并将值返回给我的C ++应用程序,以便我可以加密用户密码并与数据库进行匹配。我遇到了麻烦

$state = $this->con->prepare("SELECT salt FROM Login WHERE user = ?");
$state->bind_param("s", $this->SanatizeString($this->GetValue('salt')));
$state->execute();
$result = $state->get_result();
$row = $result->fetch_assoc();

$salt = $row['salt'];

echo $this->Crypto(json_encode(array("response" => $salt), false);

这是我在脚本中执行的操作,以返回盐。 并在应用程序中即时通讯

salt = result["response"].get<std::string>().c_str();

但是json给了我一个奇怪的错误

enter image description here

0 个答案:

没有答案