为什么输出不成功?
header("Content-type:text/html;charset=utf-8");
if($age=mysqli_connect("localhost","root","000000")){
//echo "连接成功!";
}else{
//echo "连接失败!";
}
if(mysqli_select_db($age,"test")){
//echo "数据库连接成功!";
}else{
//echo "数据库连接失败!";
}
mysqli_query($age,"set names utf8");
$query = mysqli_query($age,'select * from users');
print_r(mysqli_fetch_row($query));
mysqli_close($age);
显示的错误是:
Parse error: syntax error, unexpected '$query2' (T_VARIABLE) in F:\demo\test02\index.php on line 22