首页 > 解决方案 > 我的代码似乎正确,但 ajax 响应 500 错误

问题描述

这是我在 GoDaddy 托管服务器上使用的代码。使用 PHP5.6,它会不断返回 500 错误$stmt->get_result();。谁能帮我找出我做错了什么?

$tel=$_POST['tel'];
$stmt=$mysqli->prepare("select * from affeliate_db where tel=?");
$stmt->bind_param('i',$tel);
$stmt->execute();
$result=$stmt->get_result();
if($result->num_rows){
    echo "existed";
}else{
    echo "found usr";
}
$stmt->close();

标签: php

解决方案


推荐阅读