PHP这个报错解决方法Non-static method xc_core::instance() should not b
今天在升级网站的时候,碰上PHP问题。 简单记录分享一下。错误提示Strict Standards: Non-static method xc_core::instance() should not be called statically in D:\wwwroot\......\.........\index.php on line 4
根据错误文件第4行,去找一下。
找到对应的函数instance()。全局搜索一下,发现这个函数没有静态声明
function &instance()改为 static function &instance() 即可解决问题。前面加了static 声明静态。
居然还有编程经验分享