当我尝试在 Xamp 中连接 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/