linux php访问mysql数据库显示空白
<?php$mysqli=newmysqli();$mysqli->connect('localhost','root','123456','gywtest');//创建...
<?php
$mysqli=new mysqli();
$mysqli->connect('localhost','root','123456','gywtest');
// 创建查询
$sqlstr='select * from student';
//发送查询给MySql
$result=$mysqli->query($sqlstr);
while($row=$result->fetch_object())
{
$name=$row->stuname;
echo $name;
}
?>
运行页面空白,没反应,谁遇到过,帮忙解答下 展开
$mysqli=new mysqli();
$mysqli->connect('localhost','root','123456','gywtest');
// 创建查询
$sqlstr='select * from student';
//发送查询给MySql
$result=$mysqli->query($sqlstr);
while($row=$result->fetch_object())
{
$name=$row->stuname;
echo $name;
}
?>
运行页面空白,没反应,谁遇到过,帮忙解答下 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询