如何解决“致命错误:找不到类‘MySQLi’"?

2021-12-25 00:00:00 php mysqli

我正在做一个教程并收到此错误:

I am doing a tutorial and am getting this error:

致命错误:第 8 行找不到MySQLi"类(长 URL)

Fatal error: Class 'MySQLi' not found (LONG URL) on line 8

第8行的代码是:

$mysqli = new MySQLi($db_server, $db_user, $db_pass, $db_name);

我在网上看到有人说要查看它是否在我的 phpinfo() 中打开,但是mysqli"下面没有列出任何内容.

I saw online someone said to see if it was turned on in my phpinfo(), but there wasn't anything listed in there under for "mysqli".

另外,我运行的是 PHP 5.2.5 版

Also, I am running PHP version 5.2.5

推荐答案

听起来你只需要 安装 MySQLi.

如果您认为自己已完成此操作但仍有问题,请发布您的操作系统和其他任何可能有助于进一步诊断问题的信息.

If you think you've done that and still have a problem, please post your operating system and anything else that might help diagnose it further.

相关文章