当我尝试在Xampp中连接mysql时,这给了我

Strict Standards: Declaration of DBAccessor::connect() should be compatible with that of mysqli::connect() in C:\xampp\htdocs\cgs\CGS\com\DBAccessor.class.php on line 237

在我的代码中正确输入了数据库密码,主机和用户

最佳答案

DBAccessor是您编写的类,还是某些库/应用程序的一部分。

如果您编写了它,那么您应该知道,在扩展基类(在这种情况下为mysqli)时,扩展类中的方法应具有与基类中的方法相同的签名。

如果您没有编写它:关闭E_STRICT错误级别

error_reporting(error_reporting() & ~E_STRICT);

关于php - MySQL连接给严格标准错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/7009184/

10-13 00:17