调用mysqli函数出现有关问题,已经配置好环境

调用mysqli函数出现问题,已经配置好环境?php$mysqlinew mysqli(localhost,root,12345,student)

调用mysqli函数出现问题,已经配置好环境
<?php
 $mysqli=new mysqli("localhost","root","12345","student");
 $query="select * from person";
 $result=$mysqli->query("$query");
 if($result){
  while($obj=$result->fetch_object()){
  var_dump($obj);echo "<br/>\n";
   
  }}else{
  echo "查询失败";
  }
  $result->free();
  $mysqli->close();
 
?>

[解决办法]
把错误输出看看

PHP code
if($result=$mysqli->query(......)) {//。。。。}else  {    echo $mysqli->error;//把错误输出看看}