简体   繁体   English

codeigniter:消息:模块“ mysqli”已加载

[英]codeigniter: Message: Module 'mysqli' already loaded

I'm setting up a new project in codeigniter and after uploading all files to the live server, I got this error upon loading the website: 我正在codeigniter中建立一个新项目,并将所有文件上传到实时服务器后,在加载网站时出现此错误:

A PHP Error was encountered

Severity: Core Warning

Message: Module 'mysqli' already loaded

Filename: Unknown

Line Number: 0

Backtrace:

It's given line number 0 and I don't where I made the mistake. 它的行号为0,我不在哪里犯错了。 I'm not getting this error in localhost. 我在本地主机没有收到此错误。 Can anyone tell me how to fix this? 谁能告诉我该如何解决?

You're trying to load the php module the second time. 您正在尝试第二次加载php模块。 It's probably already set to load in php.ini file, and you try to load again dynamically somewhere inside your project. 它可能已经设置为加载到php.ini文件中,并且您尝试在项目内部的某个位置再次动态加载。 You could either comment that line inside php.ini and restart Apache, or find and delete the line that could be something like 您可以在php.ini注释该行并重新启动Apache,或者查找并删除可能类似于以下内容的行

dl('php_mysqli.dll'); // on Windows 

or 要么

dl('mysqli.so'); // on Linux

,somewhere inside a .php file. ,.php文件中的某个位置。

Better yet, test before attempting to load: 更好的是,在尝试加载之前进行测试:

if (!extension_loaded('mysqli')) {
    dl('php_mysqli.dll');
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM