消息:MY_Lang::line()的声明应该与CI_Lang::line()兼容


Message: Declaration of MY_Lang::line() should be compatible with that of CI_Lang::line()

我在服务器上上传了一个项目,得到了这个错误:

遇到PHP错误

严重性:运行时通知

消息:MY_Lang::line()的声明应该与CI_Lang:()的声明兼容

文件名:core/MY_Lang.php

线路编号:94

回溯:

文件:/home/qnscompa/public_html/erp/index.php线路:292功能:需要一次

  • 在第292行写下了这段代码。。

    require_one BASEPATH。'core/CodeIgniter.php';

MY_Lang::line()CI_Lang::line()具有不同的参数或不同的访问级别(公共/私有/受保护)。

具有完全相同的参数默认值也很重要。例如,parentClass::customMethod($thing = false)childClass::customMethod($thing)会触发错误,因为子级的方法没有为第一个参数定义默认值。