找不到mysqli类 [英] Class mysqli not found
本文介绍了找不到mysqli类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已使用mysqli
连接到我的应用程序中的数据库.它工作了好几天,然后突然开始显示以下错误:
I have used mysqli
to connect to the database in my application. It worked fine for a few days and suddenly it started showing the following error:
致命错误:找不到类'mysqli'
Fatal error: Class 'mysqli' not found
我用来连接数据库的行是:
The line I used to connect to the database is:
$link = new mysqli('localhost', 'uname', 'password', 'scripts');
能否请您告诉我可能出了什么问题?
推荐答案
Well you need to have MySQLi installed before you can use it. Also you'll have to enable it (when installed) in your php.ini
file.
您可以使用以下代码测试是否具有该代码:
You can test if you have it with this code:
if (!function_exists('mysqli_init') && !extension_loaded('mysqli')) {
echo 'no mysqli :(';
} else {
echo 'we gots it';
}
完成此操作后,仍然出现错误,请向我们提供更多详细信息(操作系统,PHP版本等)
When you've done that, and there still is an error, please provide us with more details (OS, PHP version etc)
这篇关于找不到mysqli类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文