php中:Fatal error: Class 'mysqli' not found in D:\www\order\db_fns.php on line 13,求高手指教
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<?php
function db_connect()
{
$result= new mysqli('127.0.0.1','root','root','car');
if(!result)
throw new Exception('Could not connect to database server');
else
return $result;
}
?>
</body>
</html> 展开
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<?php
function db_connect()
{
$result= new mysqli('127.0.0.1','root','root','car');
if(!result)
throw new Exception('Could not connect to database server');
else
return $result;
}
?>
</body>
</html> 展开
2个回答
展开全部
未启用mysqli扩展,修改php.ini,打开它重启apache
追问
应该怎么修改呢?谢谢~~在那里可以找到php.ini?
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询